From 9298ddf377b26890c11cb5d989a79d67128d0d0d Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 25 Feb 2006 19:14:53 +0000 Subject: [PATCH] Remove SPLASSERT(9) and spl(9) man pages and fix a few references. --- etc/Makefile | 7 +- share/man/man4/netgraph.4 | 6 +- share/man/man9/Makefile | 10 +- share/man/man9/SPLASSERT.9 | 85 ---------------- share/man/man9/callout.9 | 5 +- share/man/man9/ifnet.9 | 6 +- share/man/man9/mi_switch.9 | 4 +- share/man/man9/spl.9 | 201 ------------------------------------- share/man/man9/timeout.9 | 5 +- 9 files changed, 20 insertions(+), 309 deletions(-) delete mode 100644 share/man/man9/SPLASSERT.9 delete mode 100644 share/man/man9/spl.9 diff --git a/etc/Makefile b/etc/Makefile index 55d305d9d4..ea9406db94 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,6 +1,6 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $ -# $DragonFly: src/etc/Makefile,v 1.104 2006/01/22 14:50:26 swildner Exp $ +# $DragonFly: src/etc/Makefile,v 1.105 2006/02/25 19:14:53 swildner Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -389,6 +389,11 @@ upgrade_etc: preupgrade rm -f ${DESTDIR}/usr/share/examples/cvsup/DragonFly-dfports-supfile rm -f ${DESTDIR}/etc/periodic/weekly/400.status-pkg csh -c "rm -f ${DESTDIR}/usr/share/man/{man,cat}7/ports.7.gz" + csh -c "rm -f ${DESTDIR}/usr/share/man/{man,cat}9/SPLASSERT.9.gz" + csh -c "rm -f ${DESTDIR}/usr/share/man/{man,cat}9/spl.9.gz" +.for splman in 0 bio clock high imp net softclock softtty statclock tty vm x + csh -c "rm -f ${DESTDIR}/usr/share/man/{man,cat}9/spl${splman}.9.gz" +.endfor ldconfig -R .if !defined(BINARY_UPGRADE) # binary upgrade just copies these nodes .if !defined(NO_MAKEDEV) diff --git a/share/man/man4/netgraph.4 b/share/man/man4/netgraph.4 index a97bbfcdd7..9c1d455101 100644 --- a/share/man/man4/netgraph.4 +++ b/share/man/man4/netgraph.4 @@ -34,7 +34,7 @@ .\" Archie Cobbs .\" .\" $FreeBSD: src/share/man/man4/netgraph.4,v 1.39.2.1 2001/12/21 09:00:50 ru Exp $ -.\" $DragonFly: src/share/man/man4/netgraph.4,v 1.2 2003/06/17 04:36:59 dillon Exp $ +.\" $DragonFly: src/share/man/man4/netgraph.4,v 1.3 2006/02/25 19:14:53 swildner Exp $ .\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ .\" .Dd January 19, 1999 @@ -214,8 +214,8 @@ Whenever a node delivers a data or control message, the node may need to allow for the possibility of receiving a returning message before the original delivery function call returns. .It -Netgraph nodes and support routines generally run at -.Fn splnet . +Netgraph nodes and support routines generally run inside critical +sections. However, some nodes may want to send data and control messages from a different priority level. Netgraph supplies queueing routines which utilize the NETISR system to move message delivery to diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 7f3217be96..8aa5141385 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,8 +1,8 @@ # $FreeBSD: src/share/man/man9/Makefile,v 1.60.2.26 2003/06/13 01:04:17 hmp Exp $ -# $DragonFly: src/share/man/man9/Makefile,v 1.26 2005/12/27 22:45:23 swildner Exp $ +# $DragonFly: src/share/man/man9/Makefile,v 1.27 2006/02/25 19:14:53 swildner Exp $ MAN= DECLARE_MODULE.9 DELAY.9 DEV_MODULE.9 KASSERT.9 MD5.9 \ - MODULE_DEPEND.9 MODULE_VERSION.9 SPLASSERT.9 SYSCALL_MODULE.9 \ + MODULE_DEPEND.9 MODULE_VERSION.9 SYSCALL_MODULE.9 \ VFS.9 VFS_FHTOVP.9 VFS_INIT.9 VFS_MOUNT.9 VFS_QUOTACTL.9 \ VFS_ROOT.9 VFS_START.9 VFS_STATFS.9 VFS_SYNC.9 VFS_UNMOUNT.9 \ VFS_VGET.9 VFS_VPTOFH.9 VFS_CHECKEXP.9 \ @@ -29,7 +29,7 @@ MAN= DECLARE_MODULE.9 DELAY.9 DEV_MODULE.9 KASSERT.9 MD5.9 \ panic.9 pci.9 pfil.9 physio.9 posix4.9 psignal.9 \ resettodr.9 \ rman.9 \ - rtalloc.9 rtentry.9 sleep.9 spl.9 \ + rtalloc.9 rtentry.9 sleep.9 \ store.9 style.9 suser.9 time.9 timeout.9 uio.9 \ vget.9 vnode.9 vput.9 vref.9 vrele.9 vslock.9 \ microtime.9 microuptime.9 tvtohz.9 @@ -194,10 +194,6 @@ MLINKS+=rtalloc.9 rtalloc1.9 rtalloc.9 rtalloc_ign.9 MLINKS+=sleep.9 tsleep.9 sleep.9 wakeup.9 sleep.9 wakeup_one.9 MLINKS+=sleep.9 asleep.9 sleep.9 await.9 MLINKS+=buf.9 bp.9 -MLINKS+=spl.9 spl0.9 -MLINKS+=spl.9 splbio.9 spl.9 splclock.9 spl.9 splhigh.9 spl.9 splimp.9 -MLINKS+=spl.9 splnet.9 spl.9 splsoftclock.9 spl.9 splsofttty.9 -MLINKS+=spl.9 splstatclock.9 spl.9 spltty.9 spl.9 splvm.9 spl.9 splx.9 MLINKS+=store.9 subyte.9 store.9 suswintr.9 store.9 susword.9 store.9 suword.9 MLINKS+=suser.9 suser_cred.9 MLINKS+=suser.9 suser_proc.9 diff --git a/share/man/man9/SPLASSERT.9 b/share/man/man9/SPLASSERT.9 deleted file mode 100644 index a0696cfccc..0000000000 --- a/share/man/man9/SPLASSERT.9 +++ /dev/null @@ -1,85 +0,0 @@ -.\" Copyright (c) 2000 Jonathan M. Bresler -.\" -.\" All rights reserved. -.\" -.\" This program is free software. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD: src/share/man/man9/SPLASSERT.9,v 1.1.2.4 2001/07/21 09:16:54 schweikh Exp $ -.\" $DragonFly: src/share/man/man9/Attic/SPLASSERT.9,v 1.3 2004/06/01 11:36:53 hmp Exp $ -.\" -.Dd January 14, 2000 -.Os -.Dt SPLASSERT 9 -.Sh NAME -.Nm SPLASSERT -.Nd kernel spl level verification macro -.Sh SYNOPSIS -.Cd options INVARIANTS -.Cd options INVARIANT_SUPPORT -.Fn SPLASSERT "char *level" "char *msg" -.Sh DESCRIPTION -In a kernel compiled with both "options INVARIANTS" -and "options INVARIANT_SUPPORT", -the -.Fn SPLASSERT -macro compares the current spl level of the kernel with the spl -.Fa level -specified in the macro -.Fn SPLASSERT . -If the specified -.Fa level -is not active -.Fn SPLASSERT -calls the -.Fn KASSERT -macro with the -.Fa msg , -terminating the running system. -.Pp -In a kernel that does not have both "options INVARIANTS" -and "options INVARIANT_SUPPORT", -the -.Fn SPLASSERT -macro is defined to be a no-op. -.Sh EXAMPLES -The kernel function -.Fn rtalloc -must be called at -.Fn splnet : -.Bd -literal -offset indent -void -rtalloc(ro) - register struct route *ro; -{ - SPLASSERT(net, "rtalloc()"); - rtalloc_ign(ro, 0UL); -} -.Ed -.Sh SEE ALSO -.Xr config 8 , -.Xr KASSERT 9 , -.Xr panic 9 -.Sh AUTHORS -This manual page was written by -.An Jonathan M. Bresler -.Aq jmb@FreeBSD.org . diff --git a/share/man/man9/callout.9 b/share/man/man9/callout.9 index 5c6b9b2849..df90044e08 100644 --- a/share/man/man9/callout.9 +++ b/share/man/man9/callout.9 @@ -35,7 +35,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/timeout.9,v 1.9.2.6 2001/12/17 11:30:19 ru Exp $ -.\" $DragonFly: src/share/man/man9/callout.9,v 1.2 2003/06/17 04:37:01 dillon Exp $ +.\" $DragonFly: src/share/man/man9/callout.9,v 1.3 2006/02/25 19:14:53 swildner Exp $ .\" .Dd September 10, 1996 .Dt TIMEOUT 9 @@ -146,8 +146,7 @@ and .Fn untimeout . Timeouts are executed from .Fn softclock -at -.Fn splsoftclock . +inside a critical section. Thus they are protected from re-entrancy. .Pp The functions diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 1b871d5e5d..b4081bab23 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -27,7 +27,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/ifnet.9,v 1.9.2.10 2003/06/15 02:22:30 hmp Exp $ -.\" $DragonFly: src/share/man/man9/ifnet.9,v 1.3 2004/01/06 01:40:43 dillon Exp $ +.\" $DragonFly: src/share/man/man9/ifnet.9,v 1.4 2006/02/25 19:14:53 swildner Exp $ .Dd January 15, 1997 .Os .Dt IFNET 9 @@ -917,9 +917,7 @@ member). .Fn ifpromisc , and .Fn if_up -must be called at -.Fn splnet -or higher. +must be called inside a critical section. .Ss "Interface Address Functions" Several functions exist to look up an interface address structure given an address. diff --git a/share/man/man9/mi_switch.9 b/share/man/man9/mi_switch.9 index 7359fd68f7..e3b58c5ebb 100644 --- a/share/man/man9/mi_switch.9 +++ b/share/man/man9/mi_switch.9 @@ -35,7 +35,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/mi_switch.9,v 1.7.2.4 2001/12/17 11:30:18 ru Exp $ -.\" $DragonFly: src/share/man/man9/Attic/mi_switch.9,v 1.2 2003/06/17 04:37:01 dillon Exp $ +.\" $DragonFly: src/share/man/man9/Attic/mi_switch.9,v 1.3 2006/02/25 19:14:53 swildner Exp $ .\" .Dd November 24, 1996 .Dt MI_SWITCH 9 @@ -145,7 +145,7 @@ Note that .Fn mi_switch and thus .Fn cpu_switch -should be called at splhigh(). +should be called inside a critical section. .Pp .Sh SEE ALSO .Xr issignal 9 , diff --git a/share/man/man9/spl.9 b/share/man/man9/spl.9 deleted file mode 100644 index e91d29f16f..0000000000 --- a/share/man/man9/spl.9 +++ /dev/null @@ -1,201 +0,0 @@ -.\" -.\" Copyright (c) 1996 Joerg Wunsch -.\" -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD: src/share/man/man9/spl.9,v 1.8.2.5 2001/12/17 11:30:19 ru Exp $ -.\" $DragonFly: src/share/man/man9/Attic/spl.9,v 1.4 2004/03/11 12:28:57 hmp Exp $ -.\" -.Dd July 21, 1996 -.Os -.Dt SPL 9 -.Sh NAME -.Nm splbio , -.Nm splclock , -.Nm splhigh , -.Nm splimp , -.Nm splnet , -.Nm splsoftclock , -.Nm splsofttty , -.Nm splstatclock , -.Nm spltty , -.Nm splvm , -.Nm spl0 , -.Nm splx -.Nd manipulate interrupt priorities -.Sh SYNOPSIS -.In sys/types.h -.In sys/systm.h -.Ft intrmask_t -.Fn splbio "void" -.Ft intrmask_t -.Fn splclock "void" -.Ft intrmask_t -.Fn splhigh "void" -.Ft intrmask_t -.Fn splimp "void" -.Ft intrmask_t -.Fn splnet "void" -.Ft intrmask_t -.Fn splsoftclock "void" -.Ft intrmask_t -.Fn splsofttty "void" -.Ft intrmask_t -.Fn splstatclock "void" -.Ft intrmask_t -.Fn spltty "void" -.Ft void -.Fn spl0 "void" -.Ft void -.Fn splx "intrmask_t ipl" -.Sh DESCRIPTION -The -.Fn spl -function family sets the interrupt priority -.Dq level -of the CPU. -This prevents interrupt handlers of the blocked priority level from -being run. This is used in the -.Dq synchronous -part of a driver (the part that runs on behalf of the user process) to -examine or modify data areas that might be examined or modified by -interrupt handlers. -.Pp -Each driver that uses interrupts is normally assigned to an interrupt -priority group by a keyword in its config line. -For example: -.Bd -literal -offset indent -device foo0 at isa? port 0x0815 irq 12 tty -.Ed -.Pp -assigns interrupt 12 to the -.Dq tty -priority group. The system automatically arranges for interrupts in -the -.Em xxx -group to be called at a priority >= -.Ns spl Ns Em xxx -\&(). -.Pp -The function -.Fn splx -sets the interrupt priority to an absolute value. The intent is that -the value returned by the other functions should be saved in a local -variable, and later passed to -.Fn splx -in order to restore the previous priority. -.Pp -The function -.Fn spl0 -lowers the priority to a value where all interrupt handlers are -unblocked, but ASTs (asynchronous system traps) remain blocked until -the system is about to return to user mode. -.Pp -The traditional assignment of the various device drivers to the -interrupt priority groups can be roughly classified as: -.Bl -tag -width Fn -.It Fn splnet -All network interface drivers. -.It Fn splbio -All -.Em buffered IO -(i.e., disk and the like) drivers. -.It Fn spltty -Basically, all non-network communications devices, but effectively -used for all drivers that are neither network nor disks. -.El -.Sh RETURN VALUES -All functions except -.Fn splx -and -.Fn spl0 -return the previous priority value. -.Sh EXAMPLES -This is a typical example demonstrating the usage: -.Bd -literal -struct foo_softc { - ... - int flags; -#define FOO_ASLEEP 1 -#define FOO_READY 2 - -} foo_softc[NFOO]; - -int -foowrite(...) -{ - struct foo_softc *sc; - int s, error; - - ... - s = spltty(); - if (!(sc->flags & FOO_READY)) { - /* Not ready, must sleep on resource. */ - sc->flags |= FOO_ASLEEP; - error = tsleep(sc, 0, "foordy", 0); - sc->flags &= ~FOO_ASLEEP; - } - sc->flags &= ~FOO_READY; - splx(s); - - ... -} - -void -foointr(...) -{ - struct foo_softc *sc; - - ... - sc->flags |= FOO_READY; - if (sc->flags & FOO_ASLEEP) - /* Somebody was waiting for us, awake him. */ - wakeup(sc); - ... -} - -.Ed -Note that the interrupt handler should -.Em never -reduce the priority level. It is automatically called as it had -raised the interrupt priority to its own level, i.e. further interrupts -of the same group are being blocked. -.Sh HISTORY -The interrupt priority levels appeared in a very early version of -Unix. They have been traditionally known by number instead of by -names, and were inclusive up to higher priority levels (i.e., priority -5 has been blocking everything up to level 5). This is no longer the -case in -.Dx . -The traditional name -.Ql level -for them is still reflected in the letter -.Ql l -of the respective functions and variables, although they are not -really levels anymore, but rather different (partially inclusive) -sets of functions to be blocked during some periods of the life of -the system. The historical number scheme can be considered as a -simple linearly ordered set of interrupt priority groups. -.Sh AUTHORS -This man page was written by -.An J\(:org Wunsch . diff --git a/share/man/man9/timeout.9 b/share/man/man9/timeout.9 index 08b1f10392..6aa46c74ca 100644 --- a/share/man/man9/timeout.9 +++ b/share/man/man9/timeout.9 @@ -35,7 +35,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/timeout.9,v 1.9.2.6 2001/12/17 11:30:19 ru Exp $ -.\" $DragonFly: src/share/man/man9/Attic/timeout.9,v 1.2 2003/06/17 04:37:01 dillon Exp $ +.\" $DragonFly: src/share/man/man9/Attic/timeout.9,v 1.3 2006/02/25 19:14:53 swildner Exp $ .\" .Dd September 10, 1996 .Dt TIMEOUT 9 @@ -146,8 +146,7 @@ and .Fn untimeout . Timeouts are executed from .Fn softclock -at -.Fn splsoftclock . +inside a critical section. Thus they are protected from re-entrancy. .Pp The functions -- 2.41.0