Date: Thu, 19 Apr 2012 15:29:10 +0000 (UTC) From: Sergey Kandaurov <pluknet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r234463 - head/share/man/man9 Message-ID: <201204191529.q3JFTAho094586@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pluknet Date: Thu Apr 19 15:29:09 2012 New Revision: 234463 URL: http://svn.freebsd.org/changeset/base/234463 Log: Document swi_remove(9). Reviewed by: jhb MFC after: 1 week Modified: head/share/man/man9/Makefile head/share/man/man9/swi.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Apr 19 15:28:15 2012 (r234462) +++ head/share/man/man9/Makefile Thu Apr 19 15:29:09 2012 (r234463) @@ -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 \ Modified: head/share/man/man9/swi.9 ============================================================================== --- head/share/man/man9/swi.9 Thu Apr 19 15:28:15 2012 (r234462) +++ head/share/man/man9/swi.9 Thu Apr 19 15:29:09 2012 (r234463) @@ -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 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 V .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 even 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204191529.q3JFTAho094586>