diff options
author | pluknet <pluknet@FreeBSD.org> | 2012-04-19 15:29:09 +0000 |
---|---|---|
committer | pluknet <pluknet@FreeBSD.org> | 2012-04-19 15:29:09 +0000 |
commit | 359a7bc8fb3bf19c68eed0c89709a1250e63ec9b (patch) | |
tree | b40a8d458a0c59d06e9c4a69202dcdb57c1e422f /share | |
parent | d553b8dea8ee34099da74f1b3626adaef64c6d7e (diff) | |
download | FreeBSD-src-359a7bc8fb3bf19c68eed0c89709a1250e63ec9b.zip FreeBSD-src-359a7bc8fb3bf19c68eed0c89709a1250e63ec9b.tar.gz |
Document swi_remove(9).
Reviewed by: jhb
MFC after: 1 week
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/Makefile | 1 | ||||
-rw-r--r-- | share/man/man9/swi.9 | 32 |
2 files changed, 31 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index e5778a1..06b0e33 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1250,6 +1250,7 @@ MLINKS+=store.9 subyte.9 \ store.9 suword32.9 \ store.9 suword64.9 MLINKS+=swi.9 swi_add.9 \ + swi.9 swi_remove.9 \ swi.9 swi_sched.9 MLINKS+=sx.9 sx_assert.9 \ sx.9 sx_destroy.9 \ diff --git a/share/man/man9/swi.9 b/share/man/man9/swi.9 index 979b532..adc5421 100644 --- a/share/man/man9/swi.9 +++ b/share/man/man9/swi.9 @@ -24,11 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd April 12, 2012 +.Dd April 19, 2012 .Dt SWI 9 .Os .Sh NAME .Nm swi_add , +.Nm swi_remove , .Nm swi_sched .Nd register and schedule software interrupt handlers .Sh SYNOPSIS @@ -50,6 +51,8 @@ .Fa "enum intr_type flags" .Fa "void **cookiep" .Fc +.Ft int +.Fn swi_remove "void *cookie" .Ft void .Fn swi_sched "void *cookie" "int flags" .Sh DESCRIPTION @@ -114,6 +117,14 @@ This cookie will be set to a value that uniquely identifies this handler, and is used to schedule the handler for execution later on. .Pp The +.Fn swi_remove +function is used to teardown an interrupt handler pointed to by the +.Fa cookie +argument. +It detaches the interrupt handler from the associated interrupt event +and frees its memory. +.Pp +The .Fn swi_sched function is used to schedule an interrupt handler and its associated thread to run. @@ -164,7 +175,9 @@ networking stack, clock interrupt, and VM subsystem respectively. .Sh RETURN VALUES The .Fn swi_add -function returns zero on success and non-zero on failure. +and +.Fn swi_remove +functions return zero on success and non-zero on failure. .Sh ERRORS The .Fn swi_add @@ -201,6 +214,17 @@ flag is specified and the interrupt event pointed to by already has at least one handler, or the interrupt event already has an exclusive handler. .El +.Pp +The +.Fn swi_remove +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +A software interrupt handler pointed to by +.Fa cookie +is +.Dv NULL . +.El .Sh SEE ALSO .Xr ithread 9 , .Xr taskqueue 9 @@ -221,6 +245,10 @@ and .Fn schedsoft* functions which date back to at least .Bx 4.4 . +The +.Fn swi_remove +function first appeared in +.Fx 6.1 . .Sh BUGS Most of the global variables described in this manual page should not be global, or at the very least should not be declared in |