diff -ru 5.3_RC2/man9/BUF_LOCKINIT.9 5.3_stable_20050225/man9/BUF_LOCKINIT.9 --- 5.3_RC2/man9/BUF_LOCKINIT.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/BUF_LOCKINIT.9 Fri Feb 25 09:55:36 2005 @@ -24,14 +24,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/BUF_LOCKINIT.9,v 1.6 2001/12/26 23:14:04 davidc Exp % +.\" %FreeBSD: src/share/man/man9/BUF_LOCKINIT.9,v 1.6.8.1 2005/01/10 23:00:58 keramida Exp % .\" -.Dd July 9, 2001 +.Dd January 6, 2005 .Dt BUF_LOCKINIT 9 .Os .Sh NAME .Nm BUF_LOCKINIT -.Nd "unlocks a locked buffer" +.Nd "initializes a buffer lock" .Sh SYNOPSIS .In sys/param.h .In sys/systm.h diff -ru 5.3_RC2/man9/BUS_CONFIG_INTR.9 5.3_stable_20050225/man9/BUS_CONFIG_INTR.9 --- 5.3_RC2/man9/BUS_CONFIG_INTR.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/BUS_CONFIG_INTR.9 Fri Feb 25 09:55:36 2005 @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/BUS_CONFIG_INTR.9,v 1.4 2004/07/07 07:56:58 ru Exp % +.\" %FreeBSD: src/share/man/man9/BUS_CONFIG_INTR.9,v 1.4.2.1 2005/01/10 23:01:44 keramida Exp % .\" -.Dd September 23, 2003 +.Dd January 6, 2005 .Dt BUS_CONFIG_INTR 9 .Os .\" @@ -66,7 +66,7 @@ This means that the interrupt is raised by the rising edge of the signal on the interrupt line. The signal typically reverts to the original state so as to cause a spike. -.Dv INTR_TRIGGER_LEVEL +.It Dv INTR_TRIGGER_LEVEL The interrupt is level triggered. This means that the interrupt is raised when the signal on the interrupt line transitions and remains unchanged after that until the interrupt has been diff -ru 5.3_RC2/man9/BUS_PRINT_CHILD.9 5.3_stable_20050225/man9/BUS_PRINT_CHILD.9 --- 5.3_RC2/man9/BUS_PRINT_CHILD.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/BUS_PRINT_CHILD.9 Fri Feb 25 09:55:36 2005 @@ -26,9 +26,9 @@ .\" (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/BUS_PRINT_CHILD.9,v 1.14 2003/10/23 06:22:40 hmp Exp % +.\" %FreeBSD: src/share/man/man9/BUS_PRINT_CHILD.9,v 1.14.4.1 2005/01/10 23:06:34 keramida Exp % .\" -.Dd June 16, 1998 +.Dd January 6, 2005 .Dt BUS_PRINT_CHILD 9 .Os .Sh NAME @@ -40,7 +40,10 @@ .Ft int .Fn BUS_PRINT_CHILD "device_t dev" "device_t child" .Sh DESCRIPTION -This is called from system code which prints out a description of a +The +.Fn BUS_PRINT_CHILD +method +is called from system code which prints out a description of a device. It should describe the attachment that the child has with the parent. @@ -49,7 +52,8 @@ Please see .Xr bus_generic_print_child 9 for more information regarding the proper formatting of the messages -printed by BUS_PRINT_CHILD. +printed by +.Fn BUS_PRINT_CHILD . .Sh SEE ALSO .Xr device 9 , .Xr driver 9 diff -ru 5.3_RC2/man9/BUS_SETUP_INTR.9 5.3_stable_20050225/man9/BUS_SETUP_INTR.9 --- 5.3_RC2/man9/BUS_SETUP_INTR.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/BUS_SETUP_INTR.9 Fri Feb 25 09:55:36 2005 @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/BUS_SETUP_INTR.9,v 1.17 2004/02/10 20:34:44 jmg Exp % +.\" %FreeBSD: src/share/man/man9/BUS_SETUP_INTR.9,v 1.17.2.1 2005/01/10 23:06:34 keramida Exp % .\" -.Dd March 28, 2003 +.Dd January 6, 2005 .Dt BUS_SETUP_INTR 9 .Os .Sh NAME @@ -45,8 +45,9 @@ .Ft int .Fn bus_teardown_intr "device_t dev" "struct resource *r" "void *cookiep" .Sh DESCRIPTION -The method -.Nm +The +.Fn BUS_SETUP_INTR +method will create and attach an interrupt handler to an interrupt previously allocated by the resource manager's .Xr BUS_ALLOC_RESOURCE 9 @@ -89,7 +90,7 @@ argument is a pointer to a .Vt "void *" that -.Nm +.Fn BUS_SETUP_INTR will write a cookie for the parent bus' use to if it is successful in establishing an interrupt. Driver writers may assume that this cookie will be non-zero. @@ -119,6 +120,10 @@ This manual page was written by .An Jeroen Ruigrok van der Werven .Aq asmodai@FreeBSD.org -based on the manual pages for BUS_CREATE_INTR and BUS_CONNECT_INTR written by +based on the manual pages for +.Fn BUS_CREATE_INTR +and +.Fn BUS_CONNECT_INTR +written by .An Doug Rabson .Aq dfr@FreeBSD.org . diff -ru 5.3_RC2/man9/DECLARE_GEOM_CLASS.9 5.3_stable_20050225/man9/DECLARE_GEOM_CLASS.9 --- 5.3_RC2/man9/DECLARE_GEOM_CLASS.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/DECLARE_GEOM_CLASS.9 Fri Feb 25 09:55:36 2005 @@ -22,9 +22,9 @@ .\" (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/DECLARE_GEOM_CLASS.9,v 1.2 2004/07/06 08:21:12 ru Exp % +.\" %FreeBSD: src/share/man/man9/DECLARE_GEOM_CLASS.9,v 1.2.2.2 2005/01/13 13:45:52 keramida Exp % .\" -.Dd January 16, 2004 +.Dd January 6, 2005 .Dt DECLARE_GEOM_CLASS 9 .Os .Sh NAME @@ -49,13 +49,13 @@ The arguments to .Fn DECLARE_GEOM_CLASS are: -.Bl -inset -offset indent +.Bl -tag -offset indent .It Fa class -is the +The .Vt g_class structure which describes a GEOM class. .It Fa mod_name -is a kernel module name (not a class name!). +A kernel module name (not a class name!). .El .Pp Structure @@ -97,13 +97,16 @@ If this field is not set, the class can not be unloaded. .El .Pp -Only field +Only a .Fa name -is required, the rest is optional. +field is required; the rest are optional. .Sh RESTRICTIONS/CONDITIONS -In the +The fields of .Vt g_class -initialization one must use C99 initialization (just like in the example below). +should always be initialized using C99-style field naming +(see the initialization of +.Va example_class +below). .Sh EXAMPLES Example class declaration. .Bd -literal -offset indent diff -ru 5.3_RC2/man9/DECLARE_MODULE.9 5.3_stable_20050225/man9/DECLARE_MODULE.9 --- 5.3_RC2/man9/DECLARE_MODULE.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/DECLARE_MODULE.9 Fri Feb 25 09:55:36 2005 @@ -26,9 +26,9 @@ .\" (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/DECLARE_MODULE.9,v 1.7 2003/09/10 19:24:35 ru Exp % +.\" %FreeBSD: src/share/man/man9/DECLARE_MODULE.9,v 1.7.4.2 2005/01/13 13:45:52 keramida Exp % .\" -.Dd March 3, 2001 +.Dd January 6, 2005 .Dt DECLARE_MODULE 9 .Os .Sh NAME @@ -52,28 +52,25 @@ .Xr DEV_MODULE 9 and .Xr SYSCALL_MODULE 9 . -However, it can be called directly of course, for example in +Of course, it can also be called directly, for example in order to implement dynamic sysctls. .Pp -The arguments to -.Fn DECLARE_MODULE : -.Pp -.Fa name -is the name of the module, which will be used in the +The arguments it expects are: +.Bl -tag -width indent +.It Fa name +The module name, which will be used in the .Fn SYSINIT call to identify the module. -.Pp -.Fa data -is a +.It Fa data +A .Vt moduledata_t structure, which contains two main items, the official name of the module name, which will be used in the .Vt module_t structure and a pointer to the event handler function of type .Vt modeventhand_t . -.Pp -.Fa sub -is an argument directed to the +.It Fa sub +An argument directed to the .Fn SYSINIT macro. Valid values for this are contained in the @@ -90,16 +87,15 @@ For kernel modules that are loaded at runtime, a value of .Dv SI_SUB_EXEC is common. -.Pp -The -.Fa order -value is another argument for +.It Fa order +An argument for .Fn SYSINIT . It represents the KLDs order of initialization within the subsystem. Valid values are defined in the .Vt sysinit_elem_order enumeration .Pq In sys/kernel.h . +.El .Sh SEE ALSO .Xr DEV_MODULE 9 , .Xr DRIVER_MODULE 9 , diff -ru 5.3_RC2/man9/DEVICE_ATTACH.9 5.3_stable_20050225/man9/DEVICE_ATTACH.9 --- 5.3_RC2/man9/DEVICE_ATTACH.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/DEVICE_ATTACH.9 Fri Feb 25 09:55:36 2005 @@ -26,9 +26,9 @@ .\" (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/DEVICE_ATTACH.9,v 1.8 2004/04/11 06:37:50 imp Exp % +.\" %FreeBSD: src/share/man/man9/DEVICE_ATTACH.9,v 1.8.2.1 2005/01/10 23:51:38 keramida Exp % .\" -.Dd June 16, 1998 +.Dd January 6, 2005 .Dt DEVICE_ATTACH 9 .Os .Sh NAME @@ -40,11 +40,16 @@ .Ft int .Fn DEVICE_ATTACH "device_t dev" .Sh DESCRIPTION -Attach a device to the system. -The probe method will have been called and will have indicated that +Attach a device to the system after the +.Fn DEVICE_PROBE +method has been called and has indicated that the device exists. -This routine should initialise the hardware and allocate other -system resources (such as devfs entries). +The +.Fn DEVICE_ATTACH +method should initialize the hardware and allocate other +system resources (such as +.Xr devfs 5 +entries). .Pp Devices which implement busses should use this method to probe for the existence of devices attached to the bus and add them as @@ -55,6 +60,7 @@ .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO +.Xr devfs 5 , .Xr device 9 , .Xr DEVICE_DETACH 9 , .Xr DEVICE_IDENTIFY 9 , @@ -62,4 +68,4 @@ .Xr DEVICE_SHUTDOWN 9 .Sh AUTHORS This man page was written by -.An Doug Rabson . +.An Doug Rabson Aq dfr@FreeBSD.org . diff -ru 5.3_RC2/man9/DEVICE_DETACH.9 5.3_stable_20050225/man9/DEVICE_DETACH.9 --- 5.3_RC2/man9/DEVICE_DETACH.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/DEVICE_DETACH.9 Fri Feb 25 09:55:36 2005 @@ -26,7 +26,7 @@ .\" (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/DEVICE_DETACH.9,v 1.11 2004/07/03 18:29:23 ru Exp % +.\" %FreeBSD: src/share/man/man9/DEVICE_DETACH.9,v 1.11.2.1 2005/01/10 23:36:20 keramida Exp % .\" .Dd June 16, 1998 .Dt DEVICE_DETACH 9 @@ -43,7 +43,9 @@ Detach a device. This can be called if the user is replacing the driver software or if a device is about to be physically removed from -the system (e.g.\& for pccard devices). +the system (e.g.\& for +.Xr pccard 4 +devices). .Pp The method should deallocate any system resources allocated during the .Xr DEVICE_ATTACH 9 @@ -52,6 +54,7 @@ .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO +.Xr pccard 4 , .Xr device 9 , .Xr DEVICE_ATTACH 9 , .Xr DEVICE_IDENTIFY 9 , diff -ru 5.3_RC2/man9/DEVICE_PROBE.9 5.3_stable_20050225/man9/DEVICE_PROBE.9 --- 5.3_RC2/man9/DEVICE_PROBE.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/DEVICE_PROBE.9 Fri Feb 25 09:55:37 2005 @@ -26,9 +26,9 @@ .\" (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/DEVICE_PROBE.9,v 1.19 2004/08/11 21:52:31 imp Exp % +.\" %FreeBSD: src/share/man/man9/DEVICE_PROBE.9,v 1.19.2.1 2005/01/10 23:51:38 keramida Exp % .\" -.Dd June 16, 1998 +.Dd January 6, 2005 .Dt DEVICE_PROBE 9 .Os .Sh NAME @@ -40,7 +40,9 @@ .Ft int .Fn DEVICE_PROBE "device_t dev" .Sh DESCRIPTION -This device method should probe to see if the device is present. +The +.Fn DEVICE_PROBE +method should probe to see if the device is present. It should return 0 if the device exists, .Er ENXIO if it cannot be found. diff -ru 5.3_RC2/man9/DEVICE_SHUTDOWN.9 5.3_stable_20050225/man9/DEVICE_SHUTDOWN.9 --- 5.3_RC2/man9/DEVICE_SHUTDOWN.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/DEVICE_SHUTDOWN.9 Fri Feb 25 09:55:37 2005 @@ -26,9 +26,9 @@ .\" (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/DEVICE_SHUTDOWN.9,v 1.7 2001/10/01 16:09:23 ru Exp % +.\" %FreeBSD: src/share/man/man9/DEVICE_SHUTDOWN.9,v 1.7.8.1 2005/01/10 23:51:38 keramida Exp % .\" -.Dd June 16, 1998 +.Dd January 6, 2005 .Dt DEVICE_SHUTDOWN 9 .Os .Sh NAME @@ -40,7 +40,9 @@ .Ft int .Fn DEVICE_SHUTDOWN "device_t dev" .Sh DESCRIPTION -This is called during system shutdown to allow the driver to put the +The +.Fn DEVICE_SHUTDOWN +method is called during system shutdown to allow the driver to put the hardware into a consistent state for rebooting the computer. .Sh RETURN VALUES Zero is returned on success, otherwise an error is returned. Only in 5.3_stable_20050225/man9: EVENTHANDLER.9 diff -ru 5.3_RC2/man9/MODULE_DEPEND.9 5.3_stable_20050225/man9/MODULE_DEPEND.9 --- 5.3_RC2/man9/MODULE_DEPEND.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/MODULE_DEPEND.9 Fri Feb 25 09:55:38 2005 @@ -26,9 +26,9 @@ .\" (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/MODULE_DEPEND.9,v 1.4 2001/12/26 23:14:04 davidc Exp % +.\" %FreeBSD: src/share/man/man9/MODULE_DEPEND.9,v 1.4.8.1 2005/01/10 23:39:18 keramida Exp % .\" -.Dd March 11, 2001 +.Dd January 7, 2005 .Dt MODULE_DEPEND 9 .Os .Sh NAME @@ -43,12 +43,20 @@ .Fn MODULE_DEPEND macro sets a dependency on another kernel module with name .Fa moddepend , -which has been registered +which has registered its version with .Fn MODULE_VERSION . -Three versions must be specified on which the module can depend: -The minimal and maximal versions this module can depend on as well -as the preferred version. +.Pp +Three versions must be specified for +.Fa moddepend : +.Bl -tag -width ".Fa prefversion" +.It Fa minversion +The minimum version on which the current module can depend. +.It Fa maxversion +The maximum version on which the current module can depend. +.It Fa prefversion +The preferred version on which the current module can depend. +.El .Sh EXAMPLES .Bd -literal MODULE_DEPEND(foo, bar, 1, 3, 4); diff -ru 5.3_RC2/man9/MUTEX_PROFILING.9 5.3_stable_20050225/man9/MUTEX_PROFILING.9 --- 5.3_RC2/man9/MUTEX_PROFILING.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/MUTEX_PROFILING.9 Fri Feb 25 09:55:38 2005 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2005 Robert N. M. Watson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,9 +26,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/MUTEX_PROFILING.9,v 1.6.2.1 2004/08/25 21:05:41 jmg Exp % +.\" %FreeBSD: src/share/man/man9/MUTEX_PROFILING.9,v 1.6.2.3 2005/02/11 20:13:06 rwatson Exp % .\" -.Dd January 25, 2004 +.Dd January 7, 2005 .Dt MUTEX_PROFILING 9 .Os .Sh NAME @@ -40,7 +41,9 @@ .Dv MUTEX_PROFILING kernel option adds support for measuring and reporting mutex use and contention statistics. -These statistics are collated by acquisition point, these being +These statistics are collated by +.Dq acquisition point . +Acquisition points are distinct places in the kernel source code (identified by source file name and line number) where a mutex is acquired. .Pp @@ -156,6 +159,12 @@ fairly severe performance penalty. It should therefore only be enabled on systems where mutex profiling is actually needed. +.Dv MUTEX_PROFILING +will introduce a substantial performance overhead that is easily +monitorable using other profiling tools, so combining profiling tools +with +.Dv MUTEX_PROFILING +is not recommended. .Pp Measurements are made and stored in nanoseconds using .Xr nanotime 9 , @@ -163,3 +172,19 @@ This should still be sufficient for the locks one would be most interested in profiling (those that are held long and/or acquired often). +.Pp +.Dv MUTEX_PROFILING +should generally not be used in combination with other debugging options, as +the results may be strongly affected by interactions between the features. +In particular, +.Dv MUTEX_PROFILING +will report higher than normal +.Xr uma 9 +lock contention when run with +.Dv INVARIANTS +due to extra locking that occurs when +.Dv INVARIANTS +is present; likewise, using it in combination with +.Dv WITNESS +with +will lead to much higher lock hold times and contention in profiling output. diff -ru 5.3_RC2/man9/SYSCALL_MODULE.9 5.3_stable_20050225/man9/SYSCALL_MODULE.9 --- 5.3_RC2/man9/SYSCALL_MODULE.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/SYSCALL_MODULE.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/SYSCALL_MODULE.9,v 1.5 2003/09/08 19:57:21 ru Exp % +.\" %FreeBSD: src/share/man/man9/SYSCALL_MODULE.9,v 1.5.4.1 2005/01/10 23:45:00 keramida Exp % .\" -.Dd April 27, 2001 +.Dd January 7, 2005 .Dt SYSCALL_MODULE 9 .Os .Sh NAME @@ -49,25 +49,29 @@ expands into a kernel module declaration named as .Fa name . .Pp -.Fa offset -is a pointer to an +The rest of the arguments expected by this macro are: +.Bl -tag -width ".Fa new_sysent" +.It Fa offset +A pointer to an .Vt int which saves the offset in .Vt "struct sysent" -where the -syscall is allocated. -.Pp -.Fa new_sysent -specifies the function implementing the syscall and the number of -arguments this function needs (see +where the syscall is allocated. +.It Fa new_sysent +The function implementing the syscall and the number of arguments this +function needs (see .In sys/sysent.h ) . -.Pp -.Fa evh -is a pointer to the kernel module event handler function with the argument +.It Fa evh +A pointer to the kernel module event handler function with the argument .Fa arg . Please refer to .Xr module 9 for more information. +.It Fa arg +The argument passed to the callback functions of the +.Fa evh +event handler when it is called. +.El .Sh EXAMPLES A minimal example for a syscall module can be found in .Pa /usr/share/examples/kld/syscall/module/syscall.c . diff -ru 5.3_RC2/man9/VFS.9 5.3_stable_20050225/man9/VFS.9 --- 5.3_RC2/man9/VFS.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS.9 Fri Feb 25 09:55:39 2005 @@ -26,7 +26,7 @@ .\" (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/VFS.9,v 1.10 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS.9,v 1.10.4.1 2005/01/10 23:29:08 keramida Exp % .\" .Dd July 24, 1996 .Os @@ -46,7 +46,6 @@ .Sh SEE ALSO .Xr VFS_CHECKEXP 9 , .Xr VFS_FHTOVP 9 , -.Xr VFS_INIT 9 , .Xr VFS_MOUNT 9 , .Xr VFS_QUOTACTL 9 , .Xr VFS_START 9 , diff -ru 5.3_RC2/man9/VFS_CHECKEXP.9 5.3_stable_20050225/man9/VFS_CHECKEXP.9 --- 5.3_RC2/man9/VFS_CHECKEXP.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_CHECKEXP.9 Fri Feb 25 09:55:39 2005 @@ -22,9 +22,9 @@ .\" (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/VFS_CHECKEXP.9,v 1.11 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_CHECKEXP.9,v 1.11.4.1 2005/01/10 23:51:38 keramida Exp % .\" -.Dd September 10, 1999 +.Dd January 7, 2005 .Os .Dt VFS_CHECKEXP 9 .Sh NAME @@ -36,10 +36,12 @@ .Ft int .Fn VFS_CHECKEXP "struct mount *mp" "struct sockaddr *nam" "int *exflagsp" "struct ucred **credanonp" .Sh DESCRIPTION -This is used by the NFS server to check if a mount point is exported +The +.Fn VFS_CHECKEXP +macro is used by the NFS server to check if a mount point is exported to a client. .Pp -Its arguments are: +The arguments it expects are: .Bl -tag -width credanonp .It Fa mp The mount point to be checked. @@ -51,7 +53,9 @@ Return parameter for the anonymous credentials for this client. .El .Pp -This should be called on a file system's mount structure to determine if it +The +.Fn VFS_CHECKEXP +macro should be called on a file system's mount structure to determine if it is exported to a client whose address is contained in .Fa nam . .Pp diff -ru 5.3_RC2/man9/VFS_FHTOVP.9 5.3_stable_20050225/man9/VFS_FHTOVP.9 --- 5.3_RC2/man9/VFS_FHTOVP.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_FHTOVP.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/VFS_FHTOVP.9,v 1.16 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_FHTOVP.9,v 1.16.4.1 2005/01/10 23:51:38 keramida Exp % .\" -.Dd July 24, 1996 +.Dd January 7, 2005 .Os .Dt VFS_FHTOVP 9 .Sh NAME @@ -41,9 +41,11 @@ .Ft int .Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "struct vnode **vpp" .Sh DESCRIPTION -This is used by the NFS server to turn an NFS filehandle into a vnode. +The +.Fn VFS_FHTOVP +macro is used by the NFS server to turn an NFS filehandle into a vnode. .Pp -Its arguments are: +The arguments it expects are: .Bl -tag -width vpp .It Fa mp The file system. @@ -63,7 +65,9 @@ file system stores the inode number and inode generation counter in its filehandle. .Pp -A call to this function should generally be preceded by a call to +A call to +.Fn VFS_FHTOVP +should generally be preceded by a call to .Xr VFS_CHECKEXP 9 to check if the file is accessible to the client. .Sh RETURN VALUES Only in 5.3_RC2/man9: VFS_INIT.9 diff -ru 5.3_RC2/man9/VFS_MOUNT.9 5.3_stable_20050225/man9/VFS_MOUNT.9 --- 5.3_RC2/man9/VFS_MOUNT.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_MOUNT.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/VFS_MOUNT.9,v 1.13 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_MOUNT.9,v 1.13.4.1 2005/01/10 23:46:12 keramida Exp % .\" -.Dd July 24, 1996 +.Dd January 7, 2005 .Os .Dt VFS_MOUNT 9 .Sh NAME @@ -39,29 +39,24 @@ .In sys/mount.h .In sys/vnode.h .Ft int -.Fn VFS_MOUNT "struct mount *mp" "char *path" "caddr_t data" "struct nameidata *ndp" "struct thread *td" +.Fn VFS_MOUNT "struct mount *mp" "struct thread *td" .Sh DESCRIPTION -Mount a file system into the system's namespace. +The +.Fn VFS_MOUNT +macro mounts a file system into the system's namespace or updates the +attributes of an already mounted file system. .Pp -Its arguments are: +The arguments it expects are: .Bl -tag -width data .It Fa mp Structure representing the file system. -.It Fa path -Pathname where the file system is being mounted. -.It Fa data -File system specific data. -This should be read into the kernel using -.Xr copyin 9 . -.It Fa ndp -Contains the result of a -.Xr namei 9 -call on the pathname of the mountpoint. .It Fa td Thread which is mounting the file system. .El .Pp -This is called both to mount new file systems and to change the +The +.Fn VFS_MOUNT +macro is called both to mount new file systems and to change the attributes of an existing file system. If the .Dv MNT_UPDATE diff -ru 5.3_RC2/man9/VFS_SET.9 5.3_stable_20050225/man9/VFS_SET.9 --- 5.3_RC2/man9/VFS_SET.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_SET.9 Fri Feb 25 09:55:39 2005 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/VFS_SET.9,v 1.7 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_SET.9,v 1.7.4.1 2005/01/10 23:47:20 keramida Exp % .\" .Dd December 2, 2001 .Dt VFS_SET 9 @@ -56,7 +56,7 @@ .Pp Possible values for the .Fa flags -argument are documented below: +argument are: .Bl -hang -width ".Dv VFCF_SYNTHETIC" .It Dv VFCF_STATIC File system should be statically available in the kernel. diff -ru 5.3_RC2/man9/VFS_START.9 5.3_stable_20050225/man9/VFS_START.9 --- 5.3_RC2/man9/VFS_START.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_START.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/VFS_START.9,v 1.10 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_START.9,v 1.10.4.2 2005/01/13 13:45:52 keramida Exp % .\" -.Dd July 24, 1996 +.Dd January 7, 2005 .Os .Dt VFS_START 9 .Sh NAME @@ -41,15 +41,20 @@ .Ft int .Fn VFS_START "struct mount *mp" "int flags" "struct thread *td" .Sh DESCRIPTION -This is called after +The +.Fn VFS_START +macro is called after .Xr VFS_MOUNT 9 and before the first access to the file system. -Its arguments are: +.Pp +The arguments it expects are: .Bl -tag -width flags .It Fa mp The file system. .It Fa flags -?? +Flags passed to the +.Va vfs_start +method of the file system. .It Fa td Thread which is starting the file system. .El diff -ru 5.3_RC2/man9/VFS_STATFS.9 5.3_stable_20050225/man9/VFS_STATFS.9 --- 5.3_RC2/man9/VFS_STATFS.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_STATFS.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/VFS_STATFS.9,v 1.10 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_STATFS.9,v 1.10.4.2 2005/01/13 13:45:52 keramida Exp % .\" -.Dd July 24, 1996 +.Dd January 7, 2005 .Os .Dt VFS_STATFS 9 .Sh NAME @@ -41,17 +41,74 @@ .Ft int .Fn VFS_STATFS "struct mount *mp" "struct statfs *sbp" "struct thread *td" .Sh DESCRIPTION -This call returns various pieces of information about the file system, +The +.Fn VFS_STATFS +macro returns various pieces of information about the file system, including recommended I/O sizes, free space, free inodes, etc. .Pp -Its arguments are: +The arguments it expects are: .Bl -tag -width sbp .It Fa mp The file system. .It Fa sbp -Return parameter for the file system's status. +A +.Vt statfs +structure, as defined by +.In sys/mount.h , +into which information is placed about the file system. .It Fa td The thread which is querying the file system. +.El +.Pp +The fields of +.Vt "struct statfs" +related to the file system are as follows: +.Bl -tag -width ".Va f_mntfromname" +.It Va f_type +Type of file system. +.It Va f_flags +A copy of mount exported flags. +.It Va f_bsize +Fragment size. +.It Va f_iosize +Optimal transfer block size. +.It Va f_blocks +The total number of data blocks in the file system. +.It Va f_bfree +The number of free blocks in the file system. +.It Va f_bavail +The number of free blocks available to non-superuser processes. +.It Va f_files +The total number of file nodes in the file system. +.It Va f_ffree +The number of free nodes available to non-superuser processes. +.It Va f_syncwrites +The number of synchronous writes since the file system was mounted. +.It Va f_asyncwrites +The number of asynchronous writes since the file system was mounted. +.It Va f_syncreads +The number of synchronous reads since the file system was mounted. +.It Va f_asyncreads +The number of asynchronous reads since the file system was mounted. +.It Va f_namemax +The maximum file name length for this file system. +.It Va f_owner +The user ID of the user that mounted the file system. +.It Va f_fsid +Unique file system ID. +.It Va f_fstypename +The file system type name; a string of at most +.Dv MFSNAMELEN +bytes. +.It Va f_mntfromname +The device name the file system was mounted from; a string of at most +.Dv MNAMELEN +bytes. +.It Va f_mntonname +The name of the directory on which the file system is mounted; +a string of at most +.Dv MNAMELEN +bytes. .El .Sh SEE ALSO .Xr VFS 9 , diff -ru 5.3_RC2/man9/VFS_SYNC.9 5.3_stable_20050225/man9/VFS_SYNC.9 --- 5.3_RC2/man9/VFS_SYNC.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_SYNC.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/VFS_SYNC.9,v 1.12 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_SYNC.9,v 1.12.4.2 2005/01/13 13:45:52 keramida Exp % .\" -.Dd July 24, 1996 +.Dd January 7, 2005 .Os .Dt VFS_SYNC 9 .Sh NAME @@ -41,10 +41,13 @@ .Ft int .Fn VFS_SYNC "struct mount *mp" "int waitfor" "struct ucred *cred" "struct thread *td" .Sh DESCRIPTION -This writes out all unwritten data in a file system. +The +.Fn VFS_SYNC +macro writes out all unwritten data in the file system mounted as +.Fa mp . .Pp -Its arguments are: -.Bl -tag -width waitfor +The arguments it expects are: +.Bl -tag -width ".Fa waitfor" .It Fa mp The file system. .It Fa waitfor @@ -64,7 +67,11 @@ The calling thread. .El .Pp -This would normally call +The +.Fn VFS_SYNC +macro calls the +.Va vfs_sync +method of the filesystem, which normally calls .Xr VOP_FSYNC 9 for all the vnodes in the file system. .Sh SEE ALSO diff -ru 5.3_RC2/man9/VFS_UNMOUNT.9 5.3_stable_20050225/man9/VFS_UNMOUNT.9 --- 5.3_RC2/man9/VFS_UNMOUNT.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_UNMOUNT.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/VFS_UNMOUNT.9,v 1.10 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_UNMOUNT.9,v 1.10.4.1 2005/01/10 23:08:56 keramida Exp % .\" -.Dd July 24, 1996 +.Dd January 7, 2005 .Os .Dt VFS_UNMOUNT 9 .Sh NAME @@ -41,21 +41,26 @@ .Ft int .Fn VFS_UNMOUNT "struct mount *mp" "int mntflags" "struct thread *td" .Sh DESCRIPTION -Unmount a file system. +The +.Fn VFS_UNMOUNT +macro unmounts a file system. .Pp -Its arguments are: +The arguments it expects are: .Bl -tag -width mntflags .It Fa mp The file system. .It Fa mntflags -Various flags. +Bit-mask of flags for the unmount operation. +The flags currently supported by +.Fn VFS_UNMOUNT +are: +.Bl -tag -width ".Dv MNT_FORCE" +.It Dv MNT_FORCE +Open files are forcibly closed before the file system is unmounted. +.El .It Fa td Thread which is unmounting the file system. .El -.Pp -If the -.Dv MNT_FORCE -flag is specified then open files should be forcibly closed. .Sh SEE ALSO .Xr vflush 9 , .Xr VFS 9 , diff -ru 5.3_RC2/man9/VFS_VGET.9 5.3_stable_20050225/man9/VFS_VGET.9 --- 5.3_RC2/man9/VFS_VGET.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/VFS_VGET.9 Fri Feb 25 09:55:39 2005 @@ -26,9 +26,9 @@ .\" (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/VFS_VGET.9,v 1.14 2003/10/23 06:24:55 hmp Exp % +.\" %FreeBSD: src/share/man/man9/VFS_VGET.9,v 1.14.4.1 2005/01/10 23:51:38 keramida Exp % .\" -.Dd July 24, 1996 +.Dd January 7, 2004 .Os .Dt VFS_VGET 9 .Sh NAME @@ -41,7 +41,9 @@ .Ft int .Fn VFS_VGET "struct mount *mp" "ino_t ino" "int flags" "struct vnode **vpp" .Sh DESCRIPTION -This converts an inode number into a locked vnode. +The +.Fn VFS_VGET +macro converts an inode number into a locked vnode. .Pp Its arguments are: .Bl -tag -width ".Fa flags" diff -ru 5.3_RC2/man9/altq.9 5.3_stable_20050225/man9/altq.9 --- 5.3_RC2/man9/altq.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/altq.9 Fri Feb 25 09:55:36 2005 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/altq.9,v 1.2.2.1 2004/08/30 01:34:01 mlaier Exp % +.\" %FreeBSD: src/share/man/man9/altq.9,v 1.2.2.2 2004/12/15 19:42:05 brueffer Exp % .\" .Dd August 25, 2004 .Dt ALTQ 9 @@ -594,36 +594,6 @@ .Fn IFQ_DEQUEUE is called immediately after .Fn IFQ_POLL . -.Sh SUPPORTED DEVICES -The herein described modifications have been applied to the following -hardware drivers -.Xr an 4 , -.Xr ath 4 , -.Xr awi 4 , -.Xr bfe 4 , -.Xr em 4 , -.Xr fxp 4 , -.Xr hme 4 , -.Xr lnc 4 , -.Xr wi 4 , -.Xr de 4 , -.Xr rl 4 , -.Xr sis 4 , -.Xr vr 4 -and -.Xr xl 4 . -.Pp -The -.Xr ndis 4 -framework also has support for -.Nm -and thus all encapsulated drivers. -.Pp -The -.Xr tun 4 -pseudo driver also does support -.Nm -and includes the required modifications. .Sh SEE ALSO .Xr pf 4 , .Xr pf.conf 5 , diff -ru 5.3_RC2/man9/bpf.9 5.3_stable_20050225/man9/bpf.9 --- 5.3_RC2/man9/bpf.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/bpf.9 Fri Feb 25 09:55:36 2005 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/bpf.9,v 1.1 2004/05/19 20:39:22 dwmalone Exp % +.\" %FreeBSD: src/share/man/man9/bpf.9,v 1.1.2.1 2005/01/05 08:31:19 krion Exp % .\" .Dd May 19, 2004 .Dt BPF 9 @@ -64,7 +64,7 @@ .Xr bpf 4 describes the interface used by user programs. This man page describes the functions used by interfaces to pass packets to -.Nm +.Nm and the functions for testing and running .Nm filter machine programs. @@ -104,7 +104,7 @@ allows multiple bpf instances to be attached to a single interface, by registering an explicit .Em if_bpf -rather than using +rather than using .Em ifp->if_bpf . It is then possible to run .Xr tcpdump 1 diff -ru 5.3_RC2/man9/bus_dma.9 5.3_stable_20050225/man9/bus_dma.9 --- 5.3_RC2/man9/bus_dma.9 Sun Oct 31 14:31:45 2004 +++ 5.3_stable_20050225/man9/bus_dma.9 Fri Feb 25 09:55:36 2005 @@ -57,7 +57,7 @@ .\" 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/bus_dma.9,v 1.14 2004/08/11 14:52:33 jmg Exp % +.\" %FreeBSD: src/share/man/man9/bus_dma.9,v 1.14.2.1 2005/01/21 15:19:44 brueffer Exp % .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $ .\" .Dd May 28, 2003 @@ -324,7 +324,7 @@ The boundary indicates the set of addresses, all multiples of the boundary argument, that cannot be crossed by a single .Vt bus_dma_segment_t . -The boundary must be a power of 2 and must be no smaller that the +The boundary must be a power of 2 and must be no smaller than the maximum segment size. .Ql 0 indicates that there are no boundary restrictions. @@ -333,7 +333,7 @@ Bounds of the window of bus address space that .Em cannot be directly accessed by the device. -The window contains all address greater than lowaddr and +The window contains all addresses greater than lowaddr and less than or equal to highaddr. For example, a device incapable of DMA above 4GB, would specify a highaddr of diff -ru 5.3_RC2/man9/g_data.9 5.3_stable_20050225/man9/g_data.9 --- 5.3_RC2/man9/g_data.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/g_data.9 Fri Feb 25 09:55:37 2005 @@ -22,7 +22,7 @@ .\" (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/g_data.9,v 1.6 2004/07/06 08:21:12 ru Exp % +.\" %FreeBSD: src/share/man/man9/g_data.9,v 1.6.2.1 2005/02/14 06:26:19 pjd Exp % .\" .Dd January 16, 2004 .Dt G_DATA 9 @@ -102,7 +102,7 @@ Possible errors: .Bl -tag -width Er .It Bq Er EIO -Cannot read data. +An I/O error occurred while reading from or writing to the consumer. .El .Sh SEE ALSO .Xr geom 4 , diff -ru 5.3_RC2/man9/ifnet.9 5.3_stable_20050225/man9/ifnet.9 --- 5.3_RC2/man9/ifnet.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/ifnet.9 Fri Feb 25 09:55:37 2005 @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/ifnet.9,v 1.43.2.1 2004/09/22 04:40:21 brooks Exp % +.\" %FreeBSD: src/share/man/man9/ifnet.9,v 1.43.2.2 2005/01/05 08:31:19 krion Exp % .\" .Dd June 8, 2004 .Os @@ -747,7 +747,7 @@ .It Va ifi_link_state .Pq Vt u_char The current link state of Ethernet interfaces. -See the +See the .Sx Interface Link States section for possible values. .It Va ifi_ipackets diff -ru 5.3_RC2/man9/mac.9 5.3_stable_20050225/man9/mac.9 --- 5.3_RC2/man9/mac.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/mac.9 Fri Feb 25 09:55:37 2005 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/mac.9,v 1.11 2004/07/03 18:29:24 ru Exp % +.\" %FreeBSD: src/share/man/man9/mac.9,v 1.11.2.2 2005/02/08 11:26:11 brueffer Exp % .\" .Dd February 16, 2002 .Dt MAC 9 @@ -156,13 +156,12 @@ for information on the MAC Framework APIs. .Sh SEE ALSO .Xr acl 3 , -.Xr cap 3 , .Xr mac 3 , .Xr posix1e 3 , -.Xr lomac 4 , .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ifoff 4 , +.Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , .Xr mac_partition 4 , diff -ru 5.3_RC2/man9/mbuf_tags.9 5.3_stable_20050225/man9/mbuf_tags.9 --- 5.3_RC2/man9/mbuf_tags.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/mbuf_tags.9 Fri Feb 25 09:55:38 2005 @@ -1,8 +1,10 @@ .\" $OpenBSD: mbuf_tags.9,v 1.18 2003/12/08 07:07:35 mcbride Exp $ .\" -.\" The authors of this man page are Angelos D. Keromytis (angelos@cis.upenn.edu) -.\" and Gleb Smirnoff +.\" The authors of this man page are Angelos D. Keromytis +.\" (angelos@cis.upenn.edu), Gleb Smirnoff , and +.\" Robert Watson .\" +.\" Copyright (c) 2004 Robert N. M. Watson .\" Copyright (c) 2001 Angelos D. Keromytis .\" .\" Permission to use, copy, and modify this software with or without @@ -16,9 +18,9 @@ .\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR .\" PURPOSE. .\" -.\" %FreeBSD: src/share/man/man9/mbuf_tags.9,v 1.1 2004/05/20 09:34:19 ru Exp % +.\" %FreeBSD: src/share/man/man9/mbuf_tags.9,v 1.1.2.1 2005/02/13 15:07:52 rwatson Exp % .\" -.Dd May 20, 2004 +.Dd November 18, 2004 .Dt MBUF_TAGS 9 .Os .Sh NAME @@ -57,6 +59,34 @@ .Ft void .Fn m_tag_unlink "struct mbuf *m" "struct m_tag *t" .Sh DESCRIPTION +Mbuf tags allow additional meta-data to be associated with in-flight packets +by providing a mechanism for the tagging of additional kernel memory onto +packet header mbufs. +Tags are maintained in chains off of the +.Xr mbuf 9 +header, and maintained using a series of API calls to allocate, search, and +delete tags. +Tags are identified using an ID and cookie that uniquely identify a class +of data tagged onto the packet, and may contain an arbitrary amount of +additional storage. +Typical uses of mbuf tags include the storage of VLAN tags as described in +.Xr vlan 4 , +Mandatory Access Control (MAC) labels as described in +.Xr mac 9 , +IPsec policy information as described in +.Xr ipsec 4 , +and packet filter tags used by +.Xr pf 4 . +.Pp +Tags will be maintained across a variety of operations, including the copying +of packet headers using facilities such as +.Fn M_COPY_PKTHDR +and +.Fn M_MOVE_PKTHDR . +Any tags associated with an mbuf header will be automatically freed when the +mbuf is freed, although some subsystems will wish to delete the tags prior +to that time. +.Pp Packet tags are used by different kernel APIs to keep track of operations done or scheduled to happen to packets. @@ -92,7 +122,7 @@ cookie, respectively. .Va m_tag_free points to -.Xr free 9 . +.Fn m_tag_free_default . Following this structure are .Va m_tag_len bytes of space that can be used to store tag-specific information. @@ -197,7 +227,9 @@ using its .Va m_tag_free method. -.Xr free 9 +The +.Fn m_tag_free_default +function is used by default. .It Fn m_tag_init mbuf Initialize the tag storage for packet diff -ru 5.3_RC2/man9/mutex.9 5.3_stable_20050225/man9/mutex.9 --- 5.3_RC2/man9/mutex.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/mutex.9 Fri Feb 25 09:55:38 2005 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ -.\" %FreeBSD: src/share/man/man9/mutex.9,v 1.43 2004/07/05 17:12:52 ru Exp % +.\" %FreeBSD: src/share/man/man9/mutex.9,v 1.43.2.1 2005/01/10 22:34:21 keramida Exp % .\" .Dd February 12, 2001 .Dt MUTEX 9 @@ -126,7 +126,7 @@ require non-preemptive interrupts, and low level scheduling code. In most/all architectures both acquiring and releasing of a uncontested spin mutex is more expensive than the same operation -on a non spin mutex. +on a non-spin mutex. In order to protect an interrupt service routine from blocking against itself all interrupts are blocked on a processor while holding a spin lock. diff -ru 5.3_RC2/man9/pci.9 5.3_stable_20050225/man9/pci.9 --- 5.3_RC2/man9/pci.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/pci.9 Fri Feb 25 09:55:38 2005 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2003 Bruce M Simpson +.\" Copyright (c) 2005 Bruce M Simpson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/pci.9,v 1.5 2004/07/07 13:21:46 ru Exp % +.\" %FreeBSD: src/share/man/man9/pci.9,v 1.5.2.1 2005/02/05 09:27:20 bms Exp % .\" -.Dd May 21, 2003 +.Dd January 22, 2005 .Dt PCI 9 .Os .Sh NAME @@ -193,6 +193,11 @@ .Fa slot , and .Fa func . +The +.Fa slot +number actually refers to the number of the device on the bus, +which does not necessarily indicate its geographic location +in terms of a physical slot. .Pp The .Fn pci_find_device @@ -237,7 +242,11 @@ .Re .Sh AUTHORS This man page was written by -.An Bruce M Simpson Aq bms@spc.org . +.An Bruce M Simpson Aq bms@FreeBSD.org . .Sh BUGS -This manual page does not yet document PAE and how it affects memory-space -mapping of PCI devices. +The kernel PCI code has a number of references to +.Dq "slot numbers" . +These do not refer to the geographic location of PCI devices, +but to the device number assigned by the combination of the PCI IDSEL +mechanism and the platform firmware. +This should be taken note of when working with the kernel PCI code. diff -ru 5.3_RC2/man9/physio.9 5.3_stable_20050225/man9/physio.9 --- 5.3_RC2/man9/physio.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/physio.9 Fri Feb 25 09:55:38 2005 @@ -34,7 +34,7 @@ .\" 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/physio.9,v 1.15 2004/07/10 01:10:17 imp Exp % +.\" %FreeBSD: src/share/man/man9/physio.9,v 1.15.2.1 2005/01/05 08:31:19 krion Exp % .\" .Dd July 8, 2004 .Dt PHYSIO 9 @@ -60,7 +60,7 @@ The maximum amount of data to transfer with each call is determined by .Fa dev->si_iosize_max . -The +The .Fn physio call converts the I/O request into a .Fn strategy diff -ru 5.3_RC2/man9/printf.9 5.3_stable_20050225/man9/printf.9 --- 5.3_RC2/man9/printf.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/printf.9 Fri Feb 25 09:55:38 2005 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/printf.9,v 1.4 2004/08/10 09:19:08 joerg Exp % +.\" %FreeBSD: src/share/man/man9/printf.9,v 1.4.2.1 2005/01/23 10:08:45 glebius Exp % .\" .Dd August 10, 2004 .Dt PRINTF 9 @@ -36,13 +36,14 @@ .In sys/types.h .In sys/systm.h .Ft int -.Fn printf "const char *fmt" "..." +.Fn printf "const char *fmt" ... .Ft void -.Fn tprintf "struct proc *p" "int pri" "const char *fmt" "..." +.Fn tprintf "struct proc *p" "int pri" "const char *fmt" ... .Ft int -.Fn uprintf "const char *fmt" "..." +.Fn uprintf "const char *fmt" ... +.In sys/syslog.h .Ft void -.Fn log "int pri" "const char *fmt" "..." +.Fn log "int pri" "const char *fmt" ... .Sh DESCRIPTION The .Xr printf 9 @@ -61,7 +62,7 @@ .Fa p and the logging facility if .Fa pri -is not \&-1. +is not \-1. The .Fn log function sends the message to the kernel logging facility, using @@ -86,7 +87,7 @@ The print mask is made up of two parts: the base and the arguments. The base value is the output base expressed as an integer value; -for example, \\10 gives octal and \\20 gives hexadecimal. +for example, \e10 gives octal and \e20 gives hexadecimal. The arguments are made up of a sequence of bit identifiers. Each bit identifier begins with an integer value which is the number of the bit this identifier describes. @@ -126,7 +127,7 @@ here). Alternatively, if a .Fa pri -of \&-1 is given, the message will be appended to the last log message +of \-1 is given, the message will be appended to the last log message started by a previous call to .Fn log . As these messages are generated by the kernel itself, the facility will @@ -146,8 +147,8 @@ printf_test(void) { - printf("reg=%b\\n", 3, "\\10\\2BITTWO\\1BITONE\\n"); - printf("out: %4D\\n", "AAAA", ":"); + printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE\en"); + printf("out: %4D\en", "AAAA", ":"); } .Ed .Pp @@ -159,11 +160,11 @@ .Pp The call .Bd -literal -offset indent -log(LOG_DEBUG, "%s%d: been there.\\n", sc->sc_name, sc->sc_unit); +log(LOG_DEBUG, "%s%d: been there.\en", sc->sc_name, sc->sc_unit); .Ed .Pp will add the appropriate debug message at priority -.Em kern.debug +.Dq Li kern.debug to the system log. .Sh SEE ALSO .Xr printf 3 , diff -ru 5.3_RC2/man9/rtalloc.9 5.3_stable_20050225/man9/rtalloc.9 --- 5.3_RC2/man9/rtalloc.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/rtalloc.9 Fri Feb 25 09:55:38 2005 @@ -26,14 +26,15 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/rtalloc.9,v 1.15 2003/10/23 02:15:46 hmp Exp % -.Dd October 8, 1996 +.\" %FreeBSD: src/share/man/man9/rtalloc.9,v 1.15.4.1 2004/11/10 09:00:04 glebius Exp % +.Dd October 11, 2004 .Os .Dt RTALLOC 9 .Sh NAME .Nm rtalloc , .Nm rtalloc_ign , -.Nm rtalloc1 +.Nm rtalloc1 , +.Nm rtfree .Nd look up a route in the kernel routing table .Sh SYNOPSIS .In sys/types.h @@ -45,6 +46,13 @@ .Fn rtalloc_ign "struct route *ro" "u_long flags" .Ft "struct rtentry *" .Fn rtalloc1 "struct sockaddr *sa" "int report" "u_long flags" +.Ft void +.Fn rtfree "struct rt_entry *rt" +.Fn RTFREE "struct rt_entry *rt" +.Fn RT_LOCK "struct rt_entry *rt" +.Fn RT_UNLOCK "struct rt_entry *rt" +.Fn RT_ADDREF "struct rt_entry *rt" +.Fn RT_REMREF "struct rt_entry *rt" .Sh DESCRIPTION The kernel uses a radix tree structure to manage routes for the networking subsystem. @@ -58,22 +66,21 @@ .Pp When a route with the flag .Dv RTF_CLONING -or -.Dv RTF_PRCLONING -is retrieved, and the action of those flags is not masked, the +is retrieved, and the action of this flag is not masked, the .Nm facility automatically generates a new route using information in the -old route as a template, and in the case of -.Dv RTF_CLONING , +old route as a template, and sends an .Dv RTM_RESOLVE message to the appropriate interface-address route-management routine .Pq Fn ifa->ifa_rtrequest . +This generated route is called +.Em cloned , +and has +.Dv RTF_WASCLONED +flag set. .Dv RTF_PRCLONING -routes are assumed to be managed by the protocol family and no -resolution requests are made, but all routes generated by the cloning -process retain a reference to the route from which they were -generated. +flag is obsolete and thus ignored by facility. If the .Dv RTF_XRESOLVE flag is set, then the @@ -96,6 +103,7 @@ struct rtentry *ro_rt; }; .Ed +.Pp Thus, this function can only be used for address families which are smaller than the default .Dq Li "struct sockaddr" . @@ -119,9 +127,7 @@ .Fn rtalloc in the presence of the .Dv RTF_CLONING -and -.Dv RTF_PRCLONING -flags are undesired. +flag is undesired. The .Fa ro argument is the same as @@ -130,10 +136,15 @@ .Fa flags argument, which lists the flags in the route which are to be .Em ignored -(ordinarily, one or both of +(in most cases this is .Dv RTF_CLONING -or -.Dv RTF_PRCLONING ) . +flag). +Both +.Fn rtalloc +and +.Fn rtalloc_ign +functions return a pointer to an unlocked +.Vt "struct rtentry" . .Pp The .Fn rtalloc1 @@ -166,11 +177,53 @@ .Fa flags , is a set of flags to ignore, as in .Fn rtalloc_ign . -.Sh RETURN VALUES The +.Fn rtalloc1 +function returns a pointer to a locked +.Vt "struct rtentry" . +.Pp +The +.Fn rtfree +function frees a locked route entry, e.g., a previously allocated by +.Fn rtalloc1 . +.Pp +The +.Fn RTFREE +macro is used to free unlocked route entries, previously allocated by .Fn rtalloc -and +or +.Fn rtalloc_ign . +The +.Fn RTFREE +macro decrements the reference count on the routing table entry (see below), +and frees it if the reference count has reached zero. +.Pp +The preferred usage is allocating a route using +.Fn rtalloc +or .Fn rtalloc_ign +and freeing using +.Fn RTFREE . +.Pp +The +.Fn RT_LOCK +macro is used to lock a routing table entry. +The +.Fn RT_UNLOCK +macro is used to unlock a routing table entry. +.Pp +The +.Fn RT_ADDREF +macro increments the reference count on a previously locked route entry. +The +.Fn RT_REMREF +macro decrements the reference count on a previously locked route entry. +.Sh RETURN VALUES +The +.Fn rtalloc , +.Fn rtalloc_ign +and +.Fn rtfree functions do not return a value. The .Fn rtalloc1 @@ -198,6 +251,8 @@ .Fn rtalloc1 first appeared in .Fx 2.0 . +Routing table locking was introduced in +.Fx 5.2 . .Sh AUTHORS This manual page was written by .An Garrett Wollman , diff -ru 5.3_RC2/man9/rtentry.9 5.3_stable_20050225/man9/rtentry.9 --- 5.3_RC2/man9/rtentry.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/rtentry.9 Fri Feb 25 09:55:38 2005 @@ -26,9 +26,9 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/rtentry.9,v 1.21 2004/06/15 19:26:11 ru Exp % +.\" %FreeBSD: src/share/man/man9/rtentry.9,v 1.21.2.2 2005/01/05 08:31:19 krion Exp % .\" -.Dd October 8, 1996 +.Dd October 7, 2004 .Os .Dt RTENTRY 9 .Sh NAME @@ -76,15 +76,6 @@ intermediate stop on the way to that destination (if the .Dv RTF_GATEWAY flag is set). -.It Vt "long rt_refcnt" ; -Route entries are reference-counted; this field indicates the number -of external (to the radix tree) references. -If the -.Dv RTF_UP -flag is not present, the -.Fn rtfree -function will delete the route from the radix tree when the last -reference drops. .It Vt "u_long rt_flags" ; See below. .It Vt "struct ifnet *rt_ifp" ; @@ -95,13 +86,22 @@ name the interface and interface address to be used in sending a packet to the destination or set of destinations which this route represents. +.It Vt "struct rt_metrics_lite rt_rmx" ; +See below. +.It Vt "long rt_refcnt" ; +Route entries are reference-counted; this field indicates the number +of external (to the radix tree) references. +If the +.Dv RTF_UP +flag is not present, the +.Fn rtfree +function will delete the route from the radix tree when the last +reference drops. .It Vt "struct sockaddr *rt_genmask" ; When the .Fn rtalloc family of functions performs a cloning operation as requested by the .Dv RTF_CLONING -or -.Dv RTF_PRCLONING flag, this field is used as the mask for the new route which is inserted into the table. If this field is a null pointer, then a host @@ -118,26 +118,24 @@ .Xr arp 4 use this field to reference per-destination state internal to that protocol. -.It Vt "struct rt_metrics rt_rmx" ; -See below. .It Vt "struct rtentry *rt_gwroute" ; This member is a reference to a route whose destination is .Va rt_gateway . It is only used for .Dv RTF_GATEWAY routes. -.\" .It Vt "int (*rt_output)();" -.\" See below. .It Vt "struct rtentry *rt_parent" ; A reference to the route from which this route was cloned, or a null pointer if this route was not generated by cloning. See also the .Dv RTF_WASCLONED flag. +.It Vt "struct mtx rt_mtx" ; +Mutex to lock this routing entry. .El .Pp The following flag bits are defined: -.Bl -tag -offset indent -width ".Dv RTF_PRCLONING" -compact +.Bl -tag -offset indent -width ".Dv RTF_BLACKHOLE" -compact .It Dv RTF_UP The route is not deleted. .It Dv RTF_GATEWAY @@ -192,20 +190,11 @@ .It Dv RTF_PROTO3 Protocol-specific. .It Dv RTF_PRCLONING -Like -.Dv RTF_CLONING , -only managed by an entire protocol. -(E.g., -.Tn IP -uses this flag to manage a per-host cache integrated with the routing -table, for those destinations which do not have a link layer -performing this function.) +This flag is obsolete and simply ignored by facility. .It Dv RTF_WASCLONED Indicates that this route was generated as a result of cloning requested by the .Dv RTF_CLONING -or -.Dv RTF_PRCLONING flag. When set, the .Va rt_parent @@ -222,7 +211,22 @@ Indicates that the destination is a multicast address. .El .Pp -Every route has associated with it a set of metrics, defined by +Every route has associated with it a set of metrics, stored in +.Vt "struct rt_metrics_lite" . +Metrics are supplied in +.Vt "struct rt_metrics" +passed with routing control messages via +.Xr route 4 +API. +Currently only +.Vt rmx_mtu , rmx_expire , +and +.Vt rmx_pksent +metrics are used in +.Vt "struct rt_metrics_lite" . +All others are ignored. +.Pp +The following metrics are defined by .Vt "struct rt_metrics" : .Bl -tag -offset indent -width 6n .It Vt "u_long rmx_locks" ; @@ -282,10 +286,6 @@ .Vt rt_metrics structure first appeared in .Bx 4.3 reno . -The -.Dv RTF_PRCLONING -mechanism first appeared in -.Fx 2.0 . .Sh BUGS There are a number of historical relics remaining in this interface. The diff -ru 5.3_RC2/man9/sleep.9 5.3_stable_20050225/man9/sleep.9 --- 5.3_RC2/man9/sleep.9 Sun Oct 31 14:31:46 2004 +++ 5.3_stable_20050225/man9/sleep.9 Fri Feb 25 09:55:38 2005 @@ -23,7 +23,7 @@ .\" (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/sleep.9,v 1.43 2004/02/17 13:31:36 maxim Exp % +.\" %FreeBSD: src/share/man/man9/sleep.9,v 1.43.2.1 2005/01/10 08:27:21 cperciva Exp % .\" .Dd December 17, 1998 .Os @@ -95,6 +95,11 @@ Sleeps at most .Fa timo \&/ hz seconds (0 means no timeout). +If the +.Va Giant +lock is not held, then +.Fa timo +must be non-zero. If .Fa priority includes the diff -ru 5.3_RC2/man9/suser.9 5.3_stable_20050225/man9/suser.9 --- 5.3_RC2/man9/suser.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/suser.9 Fri Feb 25 09:55:39 2005 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/suser.9,v 1.25.2.1 2004/08/24 20:43:10 simon Exp % +.\" %FreeBSD: src/share/man/man9/suser.9,v 1.25.2.2 2005/01/05 08:31:19 krion Exp % .\" .Dd April 2, 2002 .Dt SUSER 9 @@ -87,8 +87,8 @@ call should such powers be granted. .Pp By default, the credential checked is the effective user. -There are cases -where it is instead necessary to check the real user (for example, when +There are cases +where it is instead necessary to check the real user (for example, when determining if resource limits should be applied), and this can be done by passing the .Dv SUSER_RUID diff -ru 5.3_RC2/man9/sx.9 5.3_stable_20050225/man9/sx.9 --- 5.3_RC2/man9/sx.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/sx.9 Fri Feb 25 09:55:39 2005 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" %FreeBSD: src/share/man/man9/sx.9,v 1.29 2004/07/11 16:08:25 darrenr Exp % +.\" %FreeBSD: src/share/man/man9/sx.9,v 1.29.2.2 2005/01/17 11:34:57 keramida Exp % .\" .Dd August 14, 2001 .Dt SX 9 @@ -72,7 +72,7 @@ .Ft void .Fn sx_assert "struct sx *sx" "int what" .\" -.Ss sx utility macros +.Ss Nm Ss utility macros .Fn sx_unlock "struct sx *sx" .Fn SX_SYSINIT "name" "struct sx *sx" "const char *description" .\" @@ -196,6 +196,15 @@ A thread may hold a shared or exclusive lock on an .Nm lock while sleeping. +As a result, an +.Nm +lock may not be acquired while holding a mutex. +Otherwise, if one thread slept while holding an +.Nm +lock while another thread blocked on the same +.Nm +lock after acquiring a mutex, then the second thread would effectively +end up sleeping while holding a mutex, which is not allowed. .Sh SEE ALSO .Xr condvar 9 , .Xr mtx_pool 9 , diff -ru 5.3_RC2/man9/timeout.9 5.3_stable_20050225/man9/timeout.9 --- 5.3_RC2/man9/timeout.9 Sun Oct 31 14:31:47 2004 +++ 5.3_stable_20050225/man9/timeout.9 Fri Feb 25 09:55:39 2005 @@ -34,9 +34,9 @@ .\" 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/timeout.9,v 1.23 2004/06/16 08:33:57 ru Exp % +.\" %FreeBSD: src/share/man/man9/timeout.9,v 1.23.2.1 2005/01/05 10:12:33 glebius Exp % .\" -.Dd September 10, 1996 +.Dd December 29, 2004 .Dt TIMEOUT 9 .Os .Sh NAME @@ -73,6 +73,7 @@ .Fn callout_drain "struct callout *c" .Ft void .Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" +.Fn callout_pending "struct callout *c" .Sh DESCRIPTION The function .Fn timeout @@ -218,6 +219,10 @@ to disestablish the callout, and then establishes a new callout in the same manner as .Fn timeout . +.Pp +The macro +.Fn callout_pending +can be used to check whether callout is pending. .Sh RETURN VALUES The .Fn timeout