svn commit: r237059 - stable/8/share/man/man9
pluknet at FreeBSD.org
Thu Jun 14 11:21:22 UTC 2012
Date: Thu Jun 14 11:21:21 2012
New Revision: 237059
- Update the swi_add prototype after struct ithd was split up into
struct intr_event and struct intr_thread. 
- Update the rest of struct ithd references.
- net_ih and softclock_ih cookies have gone away.
- Document swi_remove(9).
PR: docs/166864 
stable/8/share/man/man9/ (props changed)
--- stable/8/share/man/man9/Makefile Thu Jun 14 11:20:22 2012 (r237058)
+++ stable/8/share/man/man9/Makefile Thu Jun 14 11:21:21 2012 (r237059)
@@ -1206,6 +1206,7 @@ MLINKS+=store.9 subyte.9 \
store.9 suword32.9 \
MLINKS+=swi.9 swi_add.9 \
+ swi.9 swi_remove.9 \
MLINKS+=sx.9 sx_assert.9 \
sx.9 sx_destroy.9 \
--- stable/8/share/man/man9/swi.9 Thu Jun 14 11:20:22 2012 (r237058)
+++ stable/8/share/man/man9/swi.9 Thu Jun 14 11:21:21 2012 (r237059)
@@ -24,25 +24,24 @@
-.Dd October 30, 2000
+.Dd April 19, 2012
.Dt SWI 9
.Nm swi_add ,
+.Nm swi_remove ,
.Nd register and schedule software interrupt handlers
-.Vt "extern struct ithd *tty_ithd" ;
-.Vt "extern struct ithd *clk_ithd" ;
-.Vt "extern void *net_ih" ;
-.Vt "extern void *softclock_ih" ;
+.Vt "extern struct intr_event *tty_intr_event" ;
+.Vt "extern struct intr_event *clk_intr_event" ;
.Vt "extern void *vm_ih" ;
-.Fa "struct ithd **ithdp"
+.Fa "struct intr_event **eventp"
.Fa "const char *name"
.Fa "driver_intr_t handler"
.Fa "void *arg"
@@ -50,6 +49,8 @@
.Fa "enum intr_type flags"
.Fa "void **cookiep"
+.Fn swi_remove "void *cookie"
.Fn swi_sched "void *cookie" "int flags"
@@ -67,20 +68,21 @@ time, and that they can be run via a lig
-function is used to register a new software interrupt handler.
+function is used to add a new software interrupt handler to a specified
argument is an optional pointer to a
-.Vt struct ithd
+.Vt struct intr_event
-If this argument points to an existing software interrupt thread, then this
-handler will be attached to that thread.
-Otherwise a new thread will be created, and if
+If this argument points to an existing event that holds a list of
+interrupt handlers, then this handler will be attached to that event.
+Otherwise a new event will be created, and if
.Dv NULL ,
then the pointer at that address to will be modified to point to the
-newly created thread.
+newly created event.
argument is used to associate a name with a specific handler.
@@ -99,7 +101,7 @@ The
value specifies the priority of this interrupt handler relative to other
software interrupt handlers.
-If an interrupt thread is created, then this value is used as the vector,
+If an interrupt event is created, then this value is used as the vector,
argument is used to specify the attributes of a handler such as
@@ -113,6 +115,14 @@ This cookie will be set to a value that
and is used to schedule the handler for execution later on.
+function is used to teardown an interrupt handler pointed to by the
+It detaches the interrupt handler from the associated interrupt event
+and frees its memory.
function is used to schedule an interrupt handler and its associated thread to
@@ -140,30 +150,29 @@ in earlier versions of
-variables contain pointers to the software interrupt threads for the tty and
+variables contain pointers to the software interrupt handlers for the tty and
clock software interrupts, respectively.
is used to hang tty software interrupt handlers off of the same thread.
is used to hang delayed handlers off of the clock software interrupt thread so
that the functionality of
can be obtained in conjunction with
.Dv SWI_DELAY .
-.Va net_ih ,
-.Va softclock_ih ,
-handler cookies are used to schedule software interrupt threads to run for the
-networking stack, clock interrupt, and VM subsystem respectively.
+handler cookie is used to schedule software interrupt threads to run for the
.Sh RETURN VALUES
-function returns zero on success and non-zero on failure.
+functions return zero on success and non-zero on failure.
@@ -185,7 +194,7 @@ or
.Dv INTR_FAST .
.It Bq Er EINVAL
argument points to a hardware interrupt thread.
.It Bq Er EINVAL
Either of the
@@ -197,11 +206,22 @@ arguments are
.It Bq Er EINVAL
-flag is specified and the interrupt thread pointed to by
-already has at least one handler, or the interrupt thread already has an
+flag is specified and the interrupt event pointed to by
+already has at least one handler, or the interrupt event already has an
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+A software interrupt handler pointed to by
+.Dv NULL .
.Sh SEE ALSO
.Xr ithread 9 ,
.Xr taskqueue 9
@@ -222,6 +242,10 @@ and
functions which date back to at least
.Bx 4.4 .
+function first appeared in
+.Fx 6.1 .
Most of the global variables described in this manual page should not be
global, or at the very least should not be declared in
More information about the svn-src-stable-8