summaryrefslogtreecommitdiffstats
path: root/share/man/man9
diff options
context:
space:
mode:
Diffstat (limited to 'share/man/man9')
-rw-r--r--share/man/man9/DEVICE_IDENTIFY.92
-rw-r--r--share/man/man9/VOP_GETPAGES.94
-rw-r--r--share/man/man9/accept_filter.926
-rw-r--r--share/man/man9/buf.96
-rw-r--r--share/man/man9/bus_alloc_resource.92
-rw-r--r--share/man/man9/cd.910
-rw-r--r--share/man/man9/copy.918
-rw-r--r--share/man/man9/device_add_child.94
-rw-r--r--share/man/man9/mac.92
-rw-r--r--share/man/man9/mutex.94
-rw-r--r--share/man/man9/pfil.967
-rw-r--r--share/man/man9/style.919
-rw-r--r--share/man/man9/sx.94
-rw-r--r--share/man/man9/taskqueue.93
-rw-r--r--share/man/man9/time.96
-rw-r--r--share/man/man9/timeout.910
-rw-r--r--share/man/man9/vm_page_alloc.91
-rw-r--r--share/man/man9/vslock.91
18 files changed, 108 insertions, 81 deletions
diff --git a/share/man/man9/DEVICE_IDENTIFY.9 b/share/man/man9/DEVICE_IDENTIFY.9
index e9e4b74..1794c4c 100644
--- a/share/man/man9/DEVICE_IDENTIFY.9
+++ b/share/man/man9/DEVICE_IDENTIFY.9
@@ -56,7 +56,7 @@ for each resource (refer to
for more information).
.Pp
Since the device tree and the device driver tree are disjoint, the
-.Nm
+.Fn DEVICE_IDENTIFY
routine needs to take this into account.
If you load and unload your device driver that has the identify
routine, the child node has the potential for adding the same node
diff --git a/share/man/man9/VOP_GETPAGES.9 b/share/man/man9/VOP_GETPAGES.9
index cd502ce..3ead1af1 100644
--- a/share/man/man9/VOP_GETPAGES.9
+++ b/share/man/man9/VOP_GETPAGES.9
@@ -87,7 +87,7 @@ Offset in the file at which the mapped pages begin.
.Pp
The status of the
.Fn VOP_PUTPAGES
-method is returned on a page-by-page basis in the array
+method is returned on a page-by-page basis in the array
.Fa rtvals[] .
The possible status values are as follows:
.Bl -tag -width VM_PAGER_ERROR
@@ -137,7 +137,7 @@ or deactivate it (otherwise), and finally call
to arouse any threads currently waiting for the page to be faulted in,
for each page read.
.Sh RETURN VALUES
-If it successfully reads
+If it successfully reads
.Fa m[reqpage] ,
.Fn VOP_GETPAGES
returns
diff --git a/share/man/man9/accept_filter.9 b/share/man/man9/accept_filter.9
index 105be63..af9e888 100644
--- a/share/man/man9/accept_filter.9
+++ b/share/man/man9/accept_filter.9
@@ -61,7 +61,7 @@ of
.Sh IMPLEMENTATION NOTES
A module that wants to be an accept filter
must provide a
-.Vt struct accept_filter
+.Vt "struct accept_filter"
to the system:
.Bd -literal
struct accept_filter {
@@ -76,30 +76,30 @@ struct accept_filter {
The module should register it with the function
.Fn accept_filt_add ,
passing a pointer to a
-.Fa struct accept_filter ,
+.Vt "struct accept_filter" ,
allocated with
-.Fn malloc .
+.Xr malloc 9 .
.Pp
The fields of
-.Vt struct accept_filter
+.Vt "struct accept_filter"
are as follows:
-.Bl -tag -width accf_callbackXXX
-.It Vt accf_name
+.Bl -tag -width ".Va accf_callback"
+.It Va accf_name
Name of the filter;
this is how it will be accessed from userland.
-.It Fn accf_callback
+.It Va accf_callback
The callback that the kernel will do
once the connection is established.
It is the same as a socket upcall
and will be called when the connection is established
and whenever new data arrives on the socket,
unless the callback modifies the socket's flags.
-.It Fn accf_create
+.It Va accf_create
Called whenever a
.Xr setsockopt 2
installs the filter onto
a listening socket.
-.It Fn accf_destroy
+.It Va accf_destroy
Called whenever the user removes the accept filter on the socket.
.El
.Pp
@@ -115,13 +115,13 @@ the kernel will then disallow and further userland use of the filter.
The
.Fn accept_filt_get
function is used internally to locate which accept filter to use via the
-.Fn setsockopt
+.Xr setsockopt 2
system call.
.Pp
The
.Fn accept_filt_generic_mod_event
function provides a simple way to avoid duplication of code
-for accept filters which don't use the argument field to load
+for accept filters which do not use the argument field to load
and unload themselves.
This function can be used in the
.Vt moduledata_t
@@ -146,6 +146,6 @@ and
.Pp
The accept filter concept was pioneered by
.An David Filo
-at Yahoo!
+at Yahoo!\&
and refined to be a loadable module system by
-.An Alfred Perlstein.
+.An Alfred Perlstein .
diff --git a/share/man/man9/buf.9 b/share/man/man9/buf.9
index c122c51..b809b82 100644
--- a/share/man/man9/buf.9
+++ b/share/man/man9/buf.9
@@ -126,10 +126,8 @@ In the case
where B_DELWRI is not set, the underlying dirty pages are still properly
marked as dirty and the buffer can be completely freed without losing that
clean/dirty state information.
-.Po
-XXX do we have to check other flags in
-regards to this situation ???
-.Pc
+(XXX do we have to check other flags in
+regards to this situation ???)
.Pp
The kernel reserves a portion of its KVM space to hold VM Buffer's data
maps.
diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9
index b0c151b..c6865b5 100644
--- a/share/man/man9/bus_alloc_resource.9
+++ b/share/man/man9/bus_alloc_resource.9
@@ -136,7 +136,7 @@ activate resource atomically.
.It Dv RF_SHAREABLE
resource permits contemporaneous sharing.
It should always be set unless you know that the resource cannot be shared.
-It is the bus driver's task to filter out the flag if the bus doesn't
+It is the bus driver's task to filter out the flag if the bus does not
support sharing.
For example,
.Xr pccard 4
diff --git a/share/man/man9/cd.9 b/share/man/man9/cd.9
index f86344b..96a4504 100644
--- a/share/man/man9/cd.9
+++ b/share/man/man9/cd.9
@@ -43,7 +43,7 @@ and WORM drives
.Tn ( SCSI
type 4)
that support CDROM type commands.
-Some drives don't behave as the driver expects.
+Some drives do not behave as the driver expects.
See the
.Sx QUIRKS
section for information on possible flags.
@@ -91,16 +91,14 @@ determine whether the drive in question needs 10 byte commands.
First, it
issues a CAM Path Inquiry command to determine whether the protocol that
the drive speaks typically only allows 10 byte commands.
-.Po
-ATAPI and USB
+(ATAPI and USB
are two prominent examples of protocols where you generally only want to
-send 10 byte commands.
-.Pc
+send 10 byte commands.)
Then, if it gets an ILLEGAL REQUEST error back
from a 6 byte MODE SENSE or MODE SELECT command, it attempts to send the 10
byte version of the command instead.
The only reason you would need a
-quirk is if your drive uses a protocol (e.g.
+quirk is if your drive uses a protocol (e.g.,
.Tn SCSI )
that typically doesn't have a problem with 6 byte commands.
.El
diff --git a/share/man/man9/copy.9 b/share/man/man9/copy.9
index 58ac263..b6b975f 100644
--- a/share/man/man9/copy.9
+++ b/share/man/man9/copy.9
@@ -94,12 +94,10 @@ to kernel-space address
The number of bytes actually copied, including the terminating
NUL, is returned in
.Fa *done
-.Po
-if
+(if
.Fa done
is
-.No non- Ns Dv NULL
-.Pc .
+.No non- Ns Dv NULL ) .
.It Fn copyinstr
Copies a NUL-terminated string, at most
.Fa len
@@ -110,21 +108,19 @@ to kernel-space address
The number of bytes actually copied, including the terminating
NUL, is returned in
.Fa *done
-.Po
-if
+(if
.Fa done
is
-.No non- Ns Dv NULL Ns
-.Pc .
+.No non- Ns Dv NULL ) .
.\" .It Fn copyoutstr
.\" Copies a NUL-terminated string, at most
.\" bytes long, from kernel-space address
-.\" .Pa kaddr
+.\" .Fa kaddr
.\" to user-space address
-.\" .Pa uaddr .
+.\" .Fa uaddr .
.\" The number of bytes actually copied, including the terminating
.\" NUL, is returned in
-.\" .Pa *done .
+.\" .Fa *done .
.El
.Sh RETURN VALUES
The
diff --git a/share/man/man9/device_add_child.9 b/share/man/man9/device_add_child.9
index 04e026f..68877ad 100644
--- a/share/man/man9/device_add_child.9
+++ b/share/man/man9/device_add_child.9
@@ -96,10 +96,10 @@ is used, then the new child will be added as if its order was zero.
.Pp
When adding a device in the context of
.Xr DEVICE_IDENTIFY 9
-routine, some care must be taken to ensure that the device hasn't
+routine, some care must be taken to ensure that the device has not
already been added to the tree.
Because the device name and
-.Ft devclass_t
+.Vt devclass_t
are associated at probe time (not child addition time), previous
instances of the driver (say in a module that was later unloaded) may
have already added the instance.
diff --git a/share/man/man9/mac.9 b/share/man/man9/mac.9
index f8423ab..a6b3410 100644
--- a/share/man/man9/mac.9
+++ b/share/man/man9/mac.9
@@ -218,7 +218,7 @@ Sub-contracted staff include:
.An Dag-Erling Sm\(/orgrav .
.Pp
Additional contributors include:
-.Sn Pawel Dawidek ,
+.An Pawel Dawidek ,
.An Chris Faulhaber ,
.An Ilmar Habibulin ,
.An Mike Halderman ,
diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9
index 0d2ac45..2f8ec7d 100644
--- a/share/man/man9/mutex.9
+++ b/share/man/man9/mutex.9
@@ -334,7 +334,7 @@ This check should only be made if the running thread already owns
The
.Fn mtx_assert
function allows assertions specified in
-.Ar what
+.Fa what
to be made about
.Fa mutex .
If the assertions are not true and the kernel is compiled with
@@ -499,8 +499,8 @@ No locks are needed when calling these functions.
.Sh SEE ALSO
.Xr condvar 9 ,
.Xr msleep 9 ,
-.Xr MUTEX_PROFILING 9 ,
.Xr mtx_pool 9 ,
+.Xr MUTEX_PROFILING 9 ,
.Xr panic 9 ,
.Xr sema 9 ,
.Xr sx 9
diff --git a/share/man/man9/pfil.9 b/share/man/man9/pfil.9
index ac73e97..4d0cded 100644
--- a/share/man/man9/pfil.9
+++ b/share/man/man9/pfil.9
@@ -27,6 +27,7 @@
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
+.\"
.Dd September 8, 2003
.Dt PFIL 9
.Os
@@ -49,9 +50,9 @@
.Fn pfil_head_register "struct pfil_head *head"
.Ft int
.Fn pfil_head_unregister "struct pfil_head *head"
-.Ft struct pfil_head *
+.Ft "struct pfil_head *"
.Fn pfil_head_get "int af" "u_long dlt"
-.Ft struct packet_filter_hook *
+.Ft "struct packet_filter_hook *"
.Fn pfil_hook_get "int dir" "struct pfil_head *head"
.Ft void
.Fn pfil_add_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *"
@@ -71,9 +72,12 @@ transformations.
.Pp
Packet filtering points are registered with
.Fn pfil_head_register .
-Filtering points are identified by a key (void *) and a data link type
-(int) in the
-.Em pfil_head
+Filtering points are identified by a key
+.Pq Vt "void *"
+and a data link type
+.Pq Vt int
+in the
+.Vt pfil_head
structure.
Packet filters use the key and data link type to look up the filtering
point with which they register themselves.
@@ -103,11 +107,18 @@ When a filter is invoked, the packet appears just as if it
.Dq came off the wire .
That is, all protocol fields are in network byte order.
The filter is called with its specified argument, the pointer to the
-pointer to the mbuf containing the packet, the pointer to the network
-interface that the packet is traversing, and the direction (PFIL_IN
-or PFIL_OUT) that the packet is traveling.
-The filter may change which mbuf the mbuf ** argument references.
-The filter returns an errno if the packet processing is to stop, or 0
+pointer to the
+.Vt mbuf
+containing the packet, the pointer to the network
+interface that the packet is traversing, and the direction
+.Dv ( PFIL_IN
+or
+.Dv PFIL_OUT )
+that the packet is traveling.
+The filter may change which mbuf the
+.Vt "mbuf\ **"
+argument references.
+The filter returns an error (errno) if the packet processing is to stop, or 0
if the processing is to continue.
If the packet processing is to stop, it is the responsibility of the
filter to free the packet.
@@ -115,20 +126,28 @@ filter to free the packet.
The
.Nm
interface is enabled in the kernel via the
-.Sy PFIL_HOOKS
+.Dv PFIL_HOOKS
option.
.Sh RETURN VALUES
If successful,
-.Fn pfil_head_get
-returns the pfil_head structure for the given key/dlt.
-.Fn pfil_add_hook
+.Fn pfil_head_get
+returns the
+.Vt pfil_head
+structure for the given key/dlt.
+The
+.Fn pfil_add_hook
and
.Fn pfil_remove_hook
-return 0 if successful. If called with flag PFIL_WAITOK,
+functions
+return 0 if successful.
+If called with flag
+.Dv PFIL_WAITOK ,
.Fn pfil_remove_hook
is expected to always succeed.
.Pp
+The
.Fn pfil_head_unregister
+function
might sleep!
.Sh HISTORY
The
@@ -138,7 +157,7 @@ interface first appeared in
The
.Nm
input and output lists were originally implemented as
-.Fd \*[Lt]sys/queue.h\*[Gt]
+.In sys/queue.h
.Dv LIST
structures;
however this was changed in
@@ -166,19 +185,29 @@ as well as be less IP-centric.
Fine-grained locking was added in
.Fx 5.2 .
.Sh BUGS
+The
.Fn pfil_hook_get
+function
is only safe for internal use.
.Pp
-FreeBSD implements only hooks for AF_INET and AF_INET6.
+.Fx
+implements only hooks for
+.Dv AF_INET
+and
+.Dv AF_INET6 .
Packets diverted through these hooks have data in
host byte order contrary to the above statements.
.Pp
The
.Xr bridge 4
-diverts inbound AF_INET traffic, but contrary to the above
+diverts inbound
+.Dv AF_INET
+traffic, but contrary to the above
statements, the data is provided in host byte order.
.Pp
-When a pfil_head is being modified no traffic is diverted
+When a
+.Vt pfil_head
+is being modified, no traffic is diverted
(to avoid deadlock).
This means that unwanted traffic may flow for a short period
of time.
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
index cc3727c..f64e3c5 100644
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -120,7 +120,7 @@ Do not use files in
for files in the kernel.
.Pp
Leave a blank line before the next group, the
-.Pa /usr/include
+.Pa /usr/include
files,
which should be sorted alphabetically by name.
.Bd -literal
@@ -247,17 +247,20 @@ is treated as
#endif /* !COMPAT_43 */
.Ed
.Pp
-The project is slowly moving to use the
-.St -isoC-99
+The project is slowly moving to use the
+.St -isoC-99
unsigned integer identifiers of the form
-.Ic uintXX_t
-in preference to the older BSD-style integer identifiers of the form
-.Ic u_intXX_t .
+.Vt uintXX_t
+in preference to the older
+.Bx Ns -style
+integer identifiers of the form
+.Vt u_intXX_t .
New code should use the former, and old code should be converted to
the new form if other major work is being done in that area and
-there's no overriding reason to prefer the older BSD-style.
+there is no overriding reason to prefer the older
+.Bx Ns -style .
Like white-space commits, care should be taken in making
-.Ic uintXX_t
+.Vt uintXX_t
only commits.
.Pp
Enumeration values are all uppercase.
diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9
index 0ff91c7..c07dc9d 100644
--- a/share/man/man9/sx.9
+++ b/share/man/man9/sx.9
@@ -131,9 +131,9 @@ and
the
.Fn sx_assert
function tests
-.Ar sx
+.Fa sx
for the assertions specified in
-.Ar what
+.Fa what ,
and panics if they are not met.
The following assertions are supported:
.Bl -tag -width ".Dv SX_UNLOCKED"
diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9
index e7d6b82..ef323ff 100644
--- a/share/man/man9/taskqueue.9
+++ b/share/man/man9/taskqueue.9
@@ -52,7 +52,6 @@ struct task {
task_fn ta_func; /* task handler */
void *ta_context; /* argument for handler */
};
-
.Ed
.Ft struct taskqueue *
.Fn taskqueue_create "const char *name" "int mflags" "taskqueue_enqueue_fn enqueue" "void *context"
@@ -197,7 +196,7 @@ The thread taskqueue runs in a kernel thread context, and tasks run from
this thread do not run under the Giant kernel lock.
If the caller wants to run under Giant, he should explicitly acquire and
release Giant in his taskqueue handler routine.
-
+.Pp
To use these queues,
call
.Fn taskqueue_enqueue
diff --git a/share/man/man9/time.9 b/share/man/man9/time.9
index 05560d5..a5bf973 100644
--- a/share/man/man9/time.9
+++ b/share/man/man9/time.9
@@ -93,11 +93,9 @@ It is set
from
.Va time
at boot, and is updated by the periodic timer interrupt.
-.Po
-It is
+(It is
not updated by
-.Xr settimeofday 2 .
-.Pc
+.Xr settimeofday 2 . )
.Pp
All of these variables contain times
expressed in seconds and microseconds since midnight (0 hour),
diff --git a/share/man/man9/timeout.9 b/share/man/man9/timeout.9
index beb2553..94325ce 100644
--- a/share/man/man9/timeout.9
+++ b/share/man/man9/timeout.9
@@ -103,7 +103,9 @@ which can be used in conjunction with the
function to request that a scheduled timeout be canceled.
The
.Fn timeout
-call is the old style and new code should use the callout_* functions.
+call is the old style and new code should use the
+.Fn callout_*
+functions.
.Pp
The function
.Fn callout_handle_init
@@ -144,7 +146,9 @@ The behavior of calling untimeout without a previously initialized handle
is undefined.
The
.Fn untimeout
-call is the old style and new code should use the callout_* functions.
+call is the old style and new code should use the
+.Fn callout_*
+functions.
.Pp
As handles are recycled by the system, it is possible (although unlikely)
that a handle from one invocation of
@@ -176,7 +180,7 @@ The function
.Fn callout_init
initializes a callout so it can be passed to
.Fn callout_stop ,
-.Fn callout_drain
+.Fn callout_drain
or
.Fn callout_reset
without any side effects.
diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9
index 2062dd3..c364488 100644
--- a/share/man/man9/vm_page_alloc.9
+++ b/share/man/man9/vm_page_alloc.9
@@ -89,6 +89,7 @@ is no backing VM object.
This is typically used to allocate pages within the kernel virtual
address space.
.El
+.El
.Sh RETURN VALUES
The
.Vt vm_page_t
diff --git a/share/man/man9/vslock.9 b/share/man/man9/vslock.9
index 39f7a93..5476271 100644
--- a/share/man/man9/vslock.9
+++ b/share/man/man9/vslock.9
@@ -95,3 +95,4 @@ its per-process locked memory limit.
.It Bq Er EFAULT
Some portion of the indicated address range is not allocated.
There was an error faulting/mapping a page.
+.El
OpenPOWER on IntegriCloud