Deleted Added
full compact
taskqueue.9 (228715) taskqueue.9 (233648)
1.\" -*- nroff -*-
2.\"
3.\" Copyright (c) 2000 Doug Rabson
4.\"
5.\" All rights reserved.
6.\"
7.\" This program is free software.
8.\"

--- 12 unchanged lines hidden (view full) ---

21.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28.\"
1.\" -*- nroff -*-
2.\"
3.\" Copyright (c) 2000 Doug Rabson
4.\"
5.\" All rights reserved.
6.\"
7.\" This program is free software.
8.\"

--- 12 unchanged lines hidden (view full) ---

21.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28.\"
29.\" $FreeBSD: head/share/man/man9/taskqueue.9 228715 2011-12-19 18:55:13Z jhb $
29.\" $FreeBSD: head/share/man/man9/taskqueue.9 233648 2012-03-29 05:02:12Z eadler $
30.\"
31.Dd April 26, 2011
32.Dt TASKQUEUE 9
33.Os
34.Sh NAME
35.Nm taskqueue
36.Nd asynchronous task execution
37.Sh SYNOPSIS

--- 73 unchanged lines hidden (view full) ---

111The function called from
112.Fn taskqueue_enqueue
113must arrange for the queue to be processed
114(for instance by scheduling a software interrupt or waking a kernel
115thread).
116The memory location where the thread identity is recorded is used
117to signal the service thread(s) to terminate--when this value is set to
118zero and the thread is signaled it will terminate.
30.\"
31.Dd April 26, 2011
32.Dt TASKQUEUE 9
33.Os
34.Sh NAME
35.Nm taskqueue
36.Nd asynchronous task execution
37.Sh SYNOPSIS

--- 73 unchanged lines hidden (view full) ---

111The function called from
112.Fn taskqueue_enqueue
113must arrange for the queue to be processed
114(for instance by scheduling a software interrupt or waking a kernel
115thread).
116The memory location where the thread identity is recorded is used
117to signal the service thread(s) to terminate--when this value is set to
118zero and the thread is signaled it will terminate.
119If the queue is intended for use in fast interrupt handlers
120.Fn taskqueue_create_fast
119If the queue is intended for use in fast interrupt handlers
120.Fn taskqueue_create_fast
121should be used in place of
122.Fn taskqueue_create .
123.Pp
124The function
125.Fn taskqueue_free
126should be used to free the memory used by the queue.
127Any tasks that are on the queue will be executed at this time after
128which the thread servicing the queue will be signaled that it should exit.

--- 162 unchanged lines hidden (view full) ---

291The
292.Fn TASKQUEUE_DEFINE_THREAD
293macro defines a new taskqueue with its own kernel thread to serve tasks.
294The variable
295.Vt struct taskqueue *taskqueue_name
296is used to enqueue tasks onto the queue.
297.Pp
298.Fn TASKQUEUE_FAST_DEFINE
121should be used in place of
122.Fn taskqueue_create .
123.Pp
124The function
125.Fn taskqueue_free
126should be used to free the memory used by the queue.
127Any tasks that are on the queue will be executed at this time after
128which the thread servicing the queue will be signaled that it should exit.

--- 162 unchanged lines hidden (view full) ---

291The
292.Fn TASKQUEUE_DEFINE_THREAD
293macro defines a new taskqueue with its own kernel thread to serve tasks.
294The variable
295.Vt struct taskqueue *taskqueue_name
296is used to enqueue tasks onto the queue.
297.Pp
298.Fn TASKQUEUE_FAST_DEFINE
299and
299and
300.Fn TASKQUEUE_FAST_DEFINE_THREAD
300.Fn TASKQUEUE_FAST_DEFINE_THREAD
301act just like
301act just like
302.Fn TASKQUEUE_DEFINE
303and
304.Fn TASKQUEUE_DEFINE_THREAD
305respectively but taskqueue is created with
306.Fn taskqueue_create_fast .
307.Ss Predefined Task Queues
308The system provides four global taskqueues,
309.Va taskqueue_fast ,

--- 73 unchanged lines hidden ---
302.Fn TASKQUEUE_DEFINE
303and
304.Fn TASKQUEUE_DEFINE_THREAD
305respectively but taskqueue is created with
306.Fn taskqueue_create_fast .
307.Ss Predefined Task Queues
308The system provides four global taskqueues,
309.Va taskqueue_fast ,

--- 73 unchanged lines hidden ---