diff options
author | Chris Dunlop <[email protected]> | 2015-05-14 12:26:51 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-06-09 12:20:12 -0700 |
commit | a876b0305e94eea9505e7ecbae93cf7a1d24f743 (patch) | |
tree | 767f824f2d828165b6ddda760f6610c31a83ae72 /include | |
parent | dc5e8b70416e5d511bc361309bd426c767177723 (diff) |
Make taskq_wait() block until the queue is empty
Under Illumos taskq_wait() returns when there are no more tasks
in the queue. This behavior differs from ZoL and FreeBSD where
taskq_wait() returns when all the tasks in the queue at the
beginning of the taskq_wait() call are complete. New tasks
added whilst taskq_wait() is running will be ignored.
This difference in semantics makes it possible that new subtle
issues could be introduced when porting changes from Illumos.
To avoid that possibility the taskq_wait() function is being
updated such that it blocks until the queue in empty.
The previous behavior remains available through the
taskq_wait_outstanding() interface. Note that this function
was previously called taskq_wait_all() but has been renamed
to avoid confusion.
Signed-off-by: Chris Dunlop <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #455
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/taskq.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/taskq.h b/include/sys/taskq.h index 7b44e8b8a..2c437f0e7 100644 --- a/include/sys/taskq.h +++ b/include/sys/taskq.h @@ -119,7 +119,7 @@ extern void taskq_init_ent(taskq_ent_t *); extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); extern void taskq_destroy(taskq_t *); extern void taskq_wait_id(taskq_t *, taskqid_t); -extern void taskq_wait_all(taskq_t *, taskqid_t); +extern void taskq_wait_outstanding(taskq_t *, taskqid_t); extern void taskq_wait(taskq_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); extern int taskq_member(taskq_t *, void *); |