diff options
author | imp <imp@FreeBSD.org> | 2004-10-05 04:16:01 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2004-10-05 04:16:01 +0000 |
commit | cf32c9fe798d693c410e887bc556f34a7bead347 (patch) | |
tree | ad9188e83f96f6272ded257087c644b20048745e /sys/sys/taskqueue.h | |
parent | 4a0945bc22b3ab2778127bb3beacf1fd455ac628 (diff) | |
download | FreeBSD-src-cf32c9fe798d693c410e887bc556f34a7bead347.zip FreeBSD-src-cf32c9fe798d693c410e887bc556f34a7bead347.tar.gz |
Add taskqueue_drain. This waits for the specified task to finish, if
running, or returns. The calling program is responsible for making sure
that nothing new is enqueued.
# man page coming soon.
Diffstat (limited to 'sys/sys/taskqueue.h')
-rw-r--r-- | sys/sys/taskqueue.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/taskqueue.h b/sys/sys/taskqueue.h index 355f1ce..31bd9f2 100644 --- a/sys/sys/taskqueue.h +++ b/sys/sys/taskqueue.h @@ -51,6 +51,7 @@ struct taskqueue *taskqueue_create(const char *name, int mflags, taskqueue_enqueue_fn enqueue, void *context); int taskqueue_enqueue(struct taskqueue *queue, struct task *task); +void taskqueue_drain(struct taskqueue *queue, struct task *task); struct taskqueue *taskqueue_find(const char *name); void taskqueue_free(struct taskqueue *queue); void taskqueue_run(struct taskqueue *queue); @@ -69,6 +70,7 @@ void taskqueue_thread_enqueue(void *context); (task)->ta_priority = (priority); \ (task)->ta_func = (func); \ (task)->ta_context = (context); \ + (task)->ta_flags = 0; \ } while (0) /* |