diff options
Diffstat (limited to 'share/man/man9/taskqueue.9')
-rw-r--r-- | share/man/man9/taskqueue.9 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9 index d2451a48774d..83fb051d6935 100644 --- a/share/man/man9/taskqueue.9 +++ b/share/man/man9/taskqueue.9 @@ -67,6 +67,8 @@ struct task { .Fn taskqueue_drain "struct taskqueue *queue" "struct task *task" .Ft int .Fn taskqueue_member "struct taskqueue *queue" "struct thread *td" +.Ft void +.Fn taskqueue_run "struct taskqueue *queue" "struct task **tpp" .Fn TASK_INIT "struct task *task" "int priority" "task_fn_t *func" "void *context" .Fn TASKQUEUE_DECLARE "name" .Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" @@ -178,6 +180,19 @@ and .No 0 otherwise. .Pp +The +.Fn taskqueue_run +function will run all pending tasks in the specified +.Fa queue . +Normally this function is only used internally. +The +.Fa tpp +argument is a pointer to a +.Vt struct task * +that is used to record the currently running task. +The lifetime of this pointer must match that of the +.Fa queue . +.Pp A convenience macro, .Fn TASK_INIT "task" "priority" "func" "context" is provided to initialise a |