From 9cbdeda1d0a9074bd65da2aaf9c87b79545a1590 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 25 Oct 2017 15:00:52 -0700 Subject: fixes #45 expose aio to applications While here we added a test for the aio stuff, and cleaned up some dead code for the old fd notifications. There were a few improvements to shorten & clean code elsewhere, such as short-circuiting task wait when the task has no callback. The legacy sendmsg() and recvmsg() APIs are still in the socket core until we convert the device code to use the aios. --- src/core/taskq.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/taskq.c') diff --git a/src/core/taskq.c b/src/core/taskq.c index d0f04e8a..90cf7e22 100644 --- a/src/core/taskq.c +++ b/src/core/taskq.c @@ -192,6 +192,9 @@ nni_task_wait(nni_task *task) nni_taskq *tq = task->task_tq; int running; + if (task->task_cb == NULL) { + return; + } nni_mtx_lock(&tq->tq_mtx); for (;;) { running = 0; -- cgit v1.2.3-70-g09d2