diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-12-23 04:24:44 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-12-23 04:24:44 +0000 |
commit | 82064853623987331d92999e95dd1e8d1e9d4250 (patch) | |
tree | 021a051f6c68e4a078e1e48563a39cd44fc02487 | |
parent | b83679fc7dfce3ba6beb284acadd1865997a059a (diff) |
document TASK_INITIALIZER()
-rw-r--r-- | share/man/man9/task_add.9 | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/share/man/man9/task_add.9 b/share/man/man9/task_add.9 index 1431456bc88..9c70129b0a7 100644 --- a/share/man/man9/task_add.9 +++ b/share/man/man9/task_add.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: task_add.9,v 1.6 2013/12/09 01:54:49 dlg Exp $ +.\" $OpenBSD: task_add.9,v 1.7 2013/12/23 04:24:43 dlg Exp $ .\" .\" Copyright (c) 2013 David Gwynne <dlg@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 9 2013 $ +.Dd $Mdocdate: December 23 2013 $ .Dt TASK_ADD 9 .Os .Sh NAME @@ -22,7 +22,8 @@ .Nm taskq_destroy , .Nm task_set , .Nm task_add , -.Nm task_del +.Nm task_del , +.Nm TASK_INITIALIZER .Nd task queues .Sh SYNOPSIS .In sys/task.h @@ -37,6 +38,7 @@ .Ft int .Fn "task_del" "struct taskq *tq" "struct task *t" .Vt extern struct taskq *const systq; +.Fn "TASK_INITIALIZER" "void (*fn)(void *, void *)" "void *arg1" "void *arg2" .Sh DESCRIPTION The taskq @@ -135,6 +137,18 @@ It is serviced by a single thread and can therefore provide predictable ordering of work. Work can be scheduled on the system taskq from callers at or below IPL_HIGH. .Pp +A task declaration can be initialised with the +.Fn TASK_INITIALIZER +macro. +The task will be prepared to call the function specified by the +.Fa fn +argument with the +.Fa void * +arguments given in +.Fa arg1 +and +.Fa arg2 . +.Pp .Fn taskq_create and .Fn taskq_destroy |