diff options
author | ru <ru@FreeBSD.org> | 2006-09-30 17:09:59 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-09-30 17:09:59 +0000 |
commit | e06dc5d45dc84cffc41bfaa924344cd166192ce2 (patch) | |
tree | 481d5143ebdc0e134cba8d6c10645ae885b6bc75 /share | |
parent | 521c0353e962321d073a39f7d2a4bcf64d680ecc (diff) | |
download | FreeBSD-src-e06dc5d45dc84cffc41bfaa924344cd166192ce2.zip FreeBSD-src-e06dc5d45dc84cffc41bfaa924344cd166192ce2.tar.gz |
Revise markup.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/config_intrhook.9 | 17 | ||||
-rw-r--r-- | share/man/man9/device_get_sysctl.9 | 10 | ||||
-rw-r--r-- | share/man/man9/firmware.9 | 26 | ||||
-rw-r--r-- | share/man/man9/hash.9 | 21 | ||||
-rw-r--r-- | share/man/man9/rwlock.9 | 4 | ||||
-rw-r--r-- | share/man/man9/sysctl.9 | 194 |
6 files changed, 98 insertions, 174 deletions
diff --git a/share/man/man9/config_intrhook.9 b/share/man/man9/config_intrhook.9 index 7f2b67f..4a9f331 100644 --- a/share/man/man9/config_intrhook.9 +++ b/share/man/man9/config_intrhook.9 @@ -1,5 +1,5 @@ .\" -.\" Copyright (C) 2006 M. Warner Losh <imp@freebsd.org>. All rights reserved. +.\" Copyright (C) 2006 M. Warner Losh <imp@FreeBSD.org>. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -31,13 +31,13 @@ .Os .Sh NAME .Nm config_intrhook -.Nd schedules a function to be run after interrupts have been enabled, -but before root is mounted. +.Nd schedule a function to be run after interrupts have been enabled, +but before root is mounted .Sh SYNOPSIS .In sys/kernel.h -.Ft "int" +.Ft int .Fn config_intrhook_establish "struct intr_config_hook *hook" -.Ft "void" +.Ft void .Fn config_intrhook_disestablish "struct intr_config_hook *hook" .Sh DESCRIPTION The @@ -65,7 +65,7 @@ Since interrupts are disabled during the probe process, many drivers need a method to probe for devices with interrupts enabled. .Pp The requests are made with the -.Vt "intr_config_hook" +.Vt intr_config_hook structure. This structure is defined as follows: .Bd -literal @@ -96,7 +96,8 @@ These functions were introduced in .Fx 3.0 with the CAM subsystem, but are available for any driver to use. .Sh AUTHORS +.An -nosplit The functions were written by -.An Justin Gibbs Aq gibbs@freebsd.org . +.An Justin Gibbs Aq gibbs@FreeBSD.org . This manual page was written by -.An M. Warner Losh Aq imp@freebsd.org . +.An M. Warner Losh Aq imp@FreeBSD.org . diff --git a/share/man/man9/device_get_sysctl.9 b/share/man/man9/device_get_sysctl.9 index 5363a72..4dcc2ab 100644 --- a/share/man/man9/device_get_sysctl.9 +++ b/share/man/man9/device_get_sysctl.9 @@ -34,22 +34,22 @@ .Sh NAME .Nm device_get_sysctl_ctx , .Nm device_get_sysctl_tree -.Nd Manipulate the sysctl oid tree for driver specific sysctl nodes. +.Nd manipulate the sysctl oid tree for driver specific sysctl nodes .Sh SYNOPSIS .In sys/param.h .In sys/bus.h -.Ft struct sysctl_ctx_list * +.Ft "struct sysctl_ctx_list *" .Fn device_get_sysctl_ctx "device_t dev" -.Ft struct sysctl_oid * +.Ft "struct sysctl_oid *" .Fn device_get_sysctl_tree "device_t dev" .Sh DESCRIPTION The newbus system automatically adds a sysctl node for each device in the system. This node can be accessed with the .Fn device_get_sysctl_tree - function. +function. The context for the node can be obtained with the -.Fn device_get_sysctl_ctl +.Fn device_get_sysctl_ctl function. .Sh SEE ALSO .Xr device 9 diff --git a/share/man/man9/firmware.9 b/share/man/man9/firmware.9 index 7af21cf..2ff1deb 100644 --- a/share/man/man9/firmware.9 +++ b/share/man/man9/firmware.9 @@ -48,7 +48,7 @@ struct firmware { linker_file_t file; /* loadable module */ }; .Ed -.Ft struct firmware * +.Ft "struct firmware *" .Fo firmware_register .Fa "const char *imagename" .Fa "const void *data" @@ -58,12 +58,14 @@ struct firmware { .Fc .Ft int .Fn firmware_unregister "const char *imagename" -.Ft struct firmware * +.Ft "struct firmware *" .Fn firmware_get "const char *imagename" .Ft void .Fn firmware_put "struct firmware *fp" "int flags" .Sh DESCRIPTION -The firmware abstraction provides a convenient interface for loading firmware +The +.Nm firmware +abstraction provides a convenient interface for loading firmware images into the kernel. Specially crafted kernel modules are used to hold the firmware images. .Pp @@ -72,7 +74,8 @@ The function is used on load of such modules to register contained firmware images. The arguments to .Fn firmware_register -include a name that identifies the image for later requests to the firmware +include a name that identifies the image for later requests to the +.Nm firmware system, a pointer to the actual image, the size of the image and an optional parent image. The parent image is used to keep track of references to a given module so that @@ -86,13 +89,14 @@ are no pending references or returns an error otherwise. The function .Fn firmware_get returns the requested firmware image. -If the image is not yet registered with the system +If the image is not yet registered with the system, .Fn firmware_get tries to load a module with the corresponding name. This involves the linker subsystem and disk access which is why .Fn firmware_get -must not be called with any locks (except for Giant). -On success +must not be called with any locks (except for +.Va Giant ) . +On success, .Fn firmware_get returns a pointer to the image description and increases the reference count for this image. @@ -100,7 +104,9 @@ for this image. The function .Fn firmware_put is used to drop the reference to a firmware image. -The flags argument may be set to +The +.Fa flags +argument may be set to .Dv FIRMWARE_UNLOAD to indicate that the caller wishes to unload the corresponding module if the image becomes unreferenced. @@ -109,7 +115,9 @@ image becomes unreferenced. .Pp .Pa /usr/share/examples/kld .Sh HISTORY -The firmware system was introduced in +The +.Nm firmware +system was introduced in .Fx 6.1 . .Sh AUTHORS This manual page was written by diff --git a/share/man/man9/hash.9 b/share/man/man9/hash.9 index 5332e23..864a658 100644 --- a/share/man/man9/hash.9 +++ b/share/man/man9/hash.9 @@ -30,17 +30,16 @@ .Dt HASH 9 .Os .Sh NAME -.Nm hash -.\" XXX - Should all these be .Nm as well? -.\" .Nm hash32 , -.\" .Nm hash32_buf , -.\" .Nm hash32_str , -.\" .Nm hash32_strn , -.\" .Nm hash32_stre , -.\" .Nm hash32_strne +.Nm hash , +.Nm hash32 , +.Nm hash32_buf , +.Nm hash32_str , +.Nm hash32_strn , +.Nm hash32_stre , +.Nm hash32_strne .Nd general kernel hashing functions .Sh SYNOPSIS -.Fd #include <sys/hash.h> +.In sys/hash.h .Ft uint32_t .Fn hash32_buf "void *buf" "size_t len" "uint32_t hash" .Ft uint32_t @@ -56,7 +55,8 @@ The .Fn hash32 functions are used to give a consistent and general interface to a decent hashing algorithm within the kernel. -These functions can be used to hash ASCII +These functions can be used to hash +.Tn ASCII .Dv NUL terminated strings, as well as blocks of memory. .Pp @@ -119,6 +119,7 @@ u_long mask = 0; void sample_init(void) { + hashtbl = hashinit(numwanted, type, flags, &mask); } diff --git a/share/man/man9/rwlock.9 b/share/man/man9/rwlock.9 index 7349191..0b6fb0e 100644 --- a/share/man/man9/rwlock.9 +++ b/share/man/man9/rwlock.9 @@ -37,7 +37,7 @@ .Nm rw_wunlock , .Nm rw_initialized , .Nm rw_destroy , -.Nm RW_SYSINIT , +.Nm RW_SYSINIT .Nd kernel reader/writer lock .Sh SYNOPSIS .In sys/param.h @@ -219,7 +219,7 @@ is not included in the kernel, then it is impossible to assert that the current thread does or does not hold a shared lock. In the -.No non - Ns Dv WITNESS +.Pf non- Dv WITNESS case, the .Dv RA_LOCKED and diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index 9f5426a..2a1ddee 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -45,113 +45,21 @@ .Sh SYNOPSIS .In sys/types.h .In sys/sysctl.h -.Fo SYSCTL_DECL -.Fa "name" -.Fc -.Fo SYSCTL_INT -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "val" -.Fa "descr" -.Fc -.Fo SYSCTL_LONG -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "val" -.Fa "descr" -.Fc -.Fo SYSCTL_NODE -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "handler" -.Fa "descr" -.Fc -.Fo SYSCTL_OPAQUE -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "len" -.Fa "fmt" -.Fa "descr" -.Fc -.Fo SYSCTL_PROC -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "arg" -.Fa "handler" -.Fa "fmt" -.Fa "descr" -.Fc -.Fo SYSCTL_STRING -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "arg" -.Fa "len" -.Fa "descr" -.Fc -.Fo SYSCTL_STRUCT -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "type" -.Fa "descr" -.Fc -.Fo SYSCTL_UINT -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "val" -.Fa "descr" -.Fc -.Fo SYSCTL_ULONG -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "val" -.Fa "descr" -.Fc -.Fo SYSCTL_XINT -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "val" -.Fa "descr" -.Fc -.Fo SYSCTL_XLONG -.Fa "parent" -.Fa "nbr" -.Fa "name" -.Fa "access" -.Fa "ptr" -.Fa "val" -.Fa "descr" -.Fc +.Fn SYSCTL_DECL name +.Fn SYSCTL_INT parent nbr name access ptr val descr +.Fn SYSCTL_LONG parent nbr name access ptr val descr +.Fn SYSCTL_NODE parent nbr name access handler descr +.Fn SYSCTL_OPAQUE parent nbr name access ptr len fmt descr +.Fn SYSCTL_PROC parent nbr name access ptr arg handler fmt descr +.Fn SYSCTL_STRING parent nbr name access arg len descr +.Fn SYSCTL_STRUCT parent nbr name access ptr type descr +.Fn SYSCTL_UINT parent nbr name access ptr val descr +.Fn SYSCTL_ULONG parent nbr name access ptr val descr +.Fn SYSCTL_XINT parent nbr name access ptr val descr +.Fn SYSCTL_XLONG parent nbr name access ptr val descr .Sh DESCRIPTION The -.Nm +.Nm SYSCTL kernel interfaces allow code to statically declare .Xr sysctl 8 MIB entries, which will be initialized when the kernel module containing the @@ -165,20 +73,20 @@ node must be declared in the current context using .Fn SYSCTL_DECL . .Pp New nodes are declared using one of -.Nm SYSCTL_INT , -.Nm SYSCTL_LONG , -.Nm SYSCTL_NODE , -.Nm SYSCTL_OPAQUE , -.Nm SYSCTL_PROC , -.Nm SYSCTL_STRING , -.Nm SYSCTL_STRUCT , -.Nm SYSCTL_UINT , -.Nm SYSCTL_ULONG , -.Nm SYSCTL_XINT , +.Fn SYSCTL_INT , +.Fn SYSCTL_LONG , +.Fn SYSCTL_NODE , +.Fn SYSCTL_OPAQUE , +.Fn SYSCTL_PROC , +.Fn SYSCTL_STRING , +.Fn SYSCTL_STRUCT , +.Fn SYSCTL_UINT , +.Fn SYSCTL_ULONG , +.Fn SYSCTL_XINT , and -.Nm SYSCTL_XLONG . +.Fn SYSCTL_XLONG . Each macro accepts a parent name, as declared using -.Nm SYSCTL_DECL , +.Fn SYSCTL_DECL , an OID number, typically .Dv OID_AUTO , a node name, a set of control and access flags, and a description. @@ -187,9 +95,9 @@ size, a value, and a function pointer implementing the MIB entry may also be present. .Pp For most of the above macros, declaring a type as part of the access flags is -not necessary -- however, when declaring a sysctl implemented by a function, +not necessary \[em] however, when declaring a sysctl implemented by a function, including a type in the access mask is required: -.Bl -tag -width CTLTYPE_STRING +.Bl -tag -width ".Dv CTLTYPE_STRING" .It Dv CTLTYPE_NODE This is a node intended to be a parent for other nodes. .It Dv CTLTYPE_INT @@ -213,7 +121,7 @@ This is an unsigned long. .Pp All sysctl types except for new node declarations require one or more flags to be set indicating the read and write disposition of the sysctl: -.Bl -tag -width CTLFLAG_ANYBODY +.Bl -tag -width ".Dv CTLFLAG_ANYBODY" .It Dv CTLFLAG_RD This is a read-only sysctl. .It Dv CTLFLAG_WR @@ -224,7 +132,7 @@ This sysctl is readable and writable. Any user or process can write to this sysctl. .It Dv CTLFLAG_SECURE This sysctl can be written to only if the effective securelevel of the -process is <= 0. +process is \[<=] 0. .It Dv CTLFLAG_PRISON This sysctl can be written to by processes in .Xr jail 2 . @@ -247,42 +155,44 @@ implement access control to limit the undesired exposure of information about other processes, network connections, etc. .Pp The following top level sysctl name spaces are commonly used: -.Bl -tag -width regression -.It Dv compat +.Bl -tag -width ".Va regression" +.It Va compat Compatibility layer information. -.It Dv debug +.It Va debug Debugging information. Various name spaces exist under -.Dv debug . -.It Dv hw +.Va debug . +.It Va hw Hardware and device driver information. -.It Dv kern +.It Va kern Kernel behavior tuning; generally deprecated in favor of more specific name spaces. -.It Dv machdep +.It Va machdep Machine-dependent configuration parameters. -.It Dv net +.It Va net Network subsystem. Various protocols have name spaces under -.Dv net . -.It Dv regression +.Va net . +.It Va regression Regression test configuration and information. -.It Dv security +.It Va security Security and security-policy configuration and information. -.It Dv sysctl +.It Va sysctl Reserved name space for the implementation of sysctl. -.It Dv user +.It Va user Configuration settings relating to user application behavior. Generally, configuring applications using kernel sysctls is discouraged. -.It Dv vfs +.It Va vfs Virtual file system configuration and information. -.It Dv vm +.It Va vm Virtual memory subsystem configuration and information. .El .Sh EXAMPLES Sample use of -.Nm SYSCTL_DECL -to declare the "security" sysctl tree for use by new nodes: +.Fn SYSCTL_DECL +to declare the +.Va security +sysctl tree for use by new nodes: .Bd -literal -offset indent SYSCTL_DECL(_security); .Ed @@ -351,11 +261,15 @@ the future. .Xr sysctl_ctx_init 9 , .Xr sysctl_remove_oid 9 .Sh HISTORY +The .Xr sysctl 8 -first appeared in +utility first appeared in .Bx 4.4 . .Sh AUTHORS -The sysctl implementation originally found in +.An -nosplit +The +.Nm sysctl +implementation originally found in .Bx has been extensively rewritten by .An Poul-Henning Kamp |