summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2008-06-13 19:35:17 +0000
committergonzo <gonzo@FreeBSD.org>2008-06-13 19:35:17 +0000
commitec3561717134e96e74b68a9f8bfdf26d8cb4e654 (patch)
tree5258e08b60f430694f9e185ecec500dfe3306e4c /share
parent25d85147e9c41d73a46d9e0ea7e24f281f3ff43c (diff)
downloadFreeBSD-src-ec3561717134e96e74b68a9f8bfdf26d8cb4e654.zip
FreeBSD-src-ec3561717134e96e74b68a9f8bfdf26d8cb4e654.tar.gz
Add "fast" versions of macros and functions to taskqueue(9) API
description: TASKQUEUE_FAST_DEFINE(9), TASKQUEUE_FAST_DEFINE_THREAD(9), taskqueue_create_fast(9). They deal with taskqueues intended for use in fast interrupt handlers. Approved by: cognet (mentor) Reviewed by: keramida
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/taskqueue.927
1 files changed, 22 insertions, 5 deletions
diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9
index 82c7865..c0cd5b1 100644
--- a/share/man/man9/taskqueue.9
+++ b/share/man/man9/taskqueue.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 19, 2005
+.Dd June 10, 2008
.Dt TASKQUEUE 9
.Os
.Sh NAME
@@ -55,6 +55,8 @@ struct task {
.Ed
.Ft struct taskqueue *
.Fn taskqueue_create "const char *name" "int mflags" "taskqueue_enqueue_fn enqueue" "void *context"
+.Ft struct taskqueue *
+.Fn taskqueue_create_fast "const char *name" "int mflags" "taskqueue_enqueue_fn enqueue" "void *context"
.Ft void
.Fn taskqueue_free "struct taskqueue *queue"
.Ft struct taskqueue *
@@ -72,7 +74,9 @@ struct task {
.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"
+.Fn TASKQUEUE_FAST_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init"
.Fn TASKQUEUE_DEFINE_THREAD "name"
+.Fn TASKQUEUE_FAST_DEFINE_THREAD "name"
.Sh DESCRIPTION
These functions provide a simple interface for asynchronous execution
of code.
@@ -102,6 +106,10 @@ thread).
The memory location where the thread identity is recorded is used
to signal the service thread(s) to terminate--when this value is set to
zero and the thread is signaled it will terminate.
+If the queue is intended for use in fast interrupt handlers
+.Fn taskqueue_create_fast
+should be used in place of
+.Fn taskqueue_create .
.Pp
The function
.Fn taskqueue_free
@@ -188,11 +196,13 @@ are simply copied into the task structure fields and the
.Va ta_pending
field is cleared.
.Pp
-Three macros
+Five macros
.Fn TASKQUEUE_DECLARE "name" ,
.Fn TASKQUEUE_DEFINE "name" "enqueue" "context" "init" ,
+.Fn TASKQUEUE_FAST_DEFINE "name" "enqueue" "context" "init" ,
and
.Fn TASKQUEUE_DEFINE_THREAD "name"
+.Fn TASKQUEUE_FAST_DEFINE_THREAD "name"
are used to declare a reference to a global queue, to define the
implementation of the queue, and declare a queue that uses its own thread.
The
@@ -219,6 +229,16 @@ macro defines a new taskqueue with its own kernel thread to serve tasks.
The variable
.Vt struct taskqueue *taskqueue_name
is used to enqueue tasks onto the queue.
+.Pp
+.Fn TASKQUEUE_FAST_DEFINE
+and
+.Fn TASKQUEUE_FAST_DEFINE_THREAD
+act just like
+.Fn TASKQUEUE_DEFINE
+and
+.Fn TASKQUEUE_DEFINE_THREAD
+respectively but taskqueue is created with
+.Fn taskqueue_create_fast .
.Ss Predefined Task Queues
The system provides four global taskqueues,
.Va taskqueue_fast ,
@@ -295,6 +315,3 @@ There is a similar facility called tqueue in the Linux kernel.
.Sh AUTHORS
This manual page was written by
.An Doug Rabson .
-.Sh BUGS
-There is no
-.Fn taskqueue_create_fast .
OpenPOWER on IntegriCloud