summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-12-19 18:55:13 +0000
committerjhb <jhb@FreeBSD.org>2011-12-19 18:55:13 +0000
commit68a134710c655dcf316d05f6071b84d881abde0b (patch)
tree90b7b610edfef8cdb6f35fc64c2e8f294242a7b9 /share
parent9cdf8d529a192db8c34a2f422acef16340624baa (diff)
downloadFreeBSD-src-68a134710c655dcf316d05f6071b84d881abde0b.zip
FreeBSD-src-68a134710c655dcf316d05f6071b84d881abde0b.tar.gz
Add a TASK_INITIALIZER() macro that can be used to statically
initialize a task structure. Reviewed by: gj MFC after: 2 weeks
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/Makefile1
-rw-r--r--share/man/man9/taskqueue.98
2 files changed, 8 insertions, 1 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index b150b64..124fae9 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1250,6 +1250,7 @@ MLINKS+=sysctl_ctx_init.9 sysctl_ctx_entry_add.9 \
sysctl_ctx_init.9 sysctl_ctx_free.9
MLINKS+=SYSINIT.9 SYSUNINIT.9
MLINKS+=taskqueue.9 TASK_INIT.9 \
+ taskqueue.9 TASK_INITIALIZER.9 \
taskqueue.9 taskqueue_cancel.9 \
taskqueue.9 taskqueue_create.9 \
taskqueue.9 taskqueue_create_fast.9 \
diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9
index 40d64af..056ee66 100644
--- a/share/man/man9/taskqueue.9
+++ b/share/man/man9/taskqueue.9
@@ -80,6 +80,7 @@ struct timeout_task;
.Ft void
.Fn taskqueue_run "struct taskqueue *queue"
.Fn TASK_INIT "struct task *task" "int priority" "task_fn_t func" "void *context"
+.Fn TASK_INITIALIZER "int priority" "task_fn_t func" "void *context"
.Fn TASKQUEUE_DECLARE "name"
.Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init"
.Fn TASKQUEUE_FAST_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init"
@@ -243,9 +244,14 @@ A convenience macro,
is provided to initialise a
.Va task
structure.
+The
+.Fn TASK_INITIALIZER
+macro generates an initializer for a task structure.
A macro
.Fn TIMEOUT_TASK_INIT "queue" "timeout_task" "priority" "func" "context"
-initializes the timeout_task structure.
+initializes the
+.Va timeout_task
+structure.
The values of
.Va priority ,
.Va func ,
OpenPOWER on IntegriCloud