Scheduled mdoc(7) sweep.

This commit is contained in:
ru 2005-01-11 20:50:51 +00:00
parent 47082de5c6
commit 5384a04b6a
18 changed files with 134 additions and 87 deletions

View File

@ -50,7 +50,7 @@
.Nm archive_read_data_into_fd ,
.Nm archive_read_extract ,
.Nm archive_read_extract_set_progress_callback ,
.Nm archive_read_close
.Nm archive_read_close ,
.Nm archive_read_finish
.Nd functions for reading streaming archives
.Sh SYNOPSIS

View File

@ -95,7 +95,7 @@ function behaves identically to
.Fn mbsrtowcs ,
except that conversion stops after reading at most
.Fa nms
bytes from the buffer pointed to by
bytes from the buffer pointed to by
.Fa src .
.Sh RETURN VALUES
The

View File

@ -107,21 +107,24 @@ addresses in the specified family:
.Pp
.Bl -tag -width AF_INETxxxx -compact
.It Dv AF_INET
.Li struct in_addr
.Vt "struct in_addr"
(in
.In arpa/inet.h )
.It Dv AF_LINK
.Li struct sockaddr_dl
.Vt "struct sockaddr_dl"
(in
.In net/if_dl.h )
.\" .It Dv AF_INET6
.\" .Li struct in6_addr
.\" .Vt "struct in6_addr"
.\" (in
.\" .In netinet6/in6.h )
.El
.Pp
.Dv AF_INET and AF_LINK constants are defined in
.In sys/socket.h
.Dv AF_INET
and
.Dv AF_LINK
constants are defined in
.In sys/socket.h .
.Sh RETURN VALUES
The
.Fn addr2ascii
@ -167,7 +170,7 @@ are implemented in terms of the
functions, rather than the other way around.
.Sh ERRORS
When a failure is returned,
.Li errno
.Va errno
is set to one of the following values:
.Bl -tag -width Er
.It Bq Er ENAMETOOLONG
@ -222,7 +225,7 @@ A truly
generic interface would provide a means for determining the length of
the buffer to be used so that it could be dynamically allocated, and
would always require a
.Dq Li "struct sockaddr"
.Vt "struct sockaddr"
to hold the binary address.
Unfortunately, this is incompatible with existing
practice.

View File

@ -46,7 +46,8 @@ in addition to blank lines and comments preceded by a
symbol.
.Pp
Currently, the implementation supports two syntax styles for label
element declaration. The old (deprecated) syntax consists of a
element declaration.
The old (deprecated) syntax consists of a
single line with two fields separated by white space: the object
class name, and a list of label elements as used by the
.Xr mac_prepare 3

View File

@ -117,7 +117,9 @@ bytes long;
this buffer will be used instead of the current buffer.
If
.Fa buf
is not NULL, it is the caller's responsibility to
is not
.Dv NULL ,
it is the caller's responsibility to
.Xr free 3
this buffer after closing the stream.
(If the

View File

@ -106,7 +106,7 @@ is equivalent to
.Dq Li %m/%d/%y .
.It Cm %d
is replaced by the day of the month as a decimal number (01-31).
.It Cm \&%E* Cm \&%O*
.It Cm %E* %O*
POSIX locale extensions.
The sequences
%Ec %EC %Ex %EX %Ey %EY
@ -135,7 +135,8 @@ but as a decimal number without century (00-99).
.It Cm \&%H
is replaced by the hour (24-hour clock) as a decimal number (00-23).
.It Cm %h
the same as %b.
the same as
.Cm %b .
.It Cm \&%I
is replaced by the hour (12-hour clock) as a decimal number (01-12).
.It Cm %j
@ -152,8 +153,9 @@ is replaced by the minute as a decimal number (00-59).
is replaced by the month as a decimal number (01-12).
.It Cm %n
is replaced by a newline.
.It Cm \&%O*
the same as %E*.
.It Cm %O*
the same as
.Cm %E* .
.It Cm %p
is replaced by national representation of either
"ante meridiem"
@ -207,7 +209,7 @@ is replaced by the year with century as a decimal number.
is replaced by the year without century as a decimal number (00-99).
.It Cm \&%Z
is replaced by the time zone name.
.It Cm \&%z
.It Cm %z
is replaced by the time zone offset from UTC; a leading plus sign stands for
east of UTC, a minus sign for west of UTC, hours and minutes follow
with two digits each and no delimiter between them (common form for
@ -216,13 +218,13 @@ RFC 822 date headers).
is replaced by national representation of the date and time
(the format is similar to that produced by
.Xr date 1 ) .
.It Cm \&%-*
.It Cm %-*
GNU libc extension.
Do not do any padding when performing numerical outputs.
.It Cm \&%_*
.It Cm %_*
GNU libc extension.
Explicitly specify space for padding.
.It Cm \&%0*
.It Cm %0*
GNU libc extension.
Explicitly specify zero for padding.
.It Cm %%

View File

@ -605,12 +605,12 @@ characters may be used to name
an ordinary file, special file, or directory.
.Pp
These characters may be arbitrary eight-bit values,
excluding NUL
.Po Tn ASCII
.No 0 Pc
and the
excluding
.Dv NUL
.Tn ( ASCII
0) and the
.Ql \&/
character (slash,
character (slash,
.Tn ASCII
47).
.Pp
@ -625,7 +625,7 @@ file names because of the special meaning attached to these characters
by the shell.
.It Path Name
A path name is a
.Tn NUL Ns -terminated
.Dv NUL Ns -terminated
character string starting with an
optional slash
.Ql \&/ ,

View File

@ -332,43 +332,62 @@ set to
.\"
.Ss Signals
.\"
.Pp
The current implementation creates a special a signal thread.
The current implementation creates a special signal thread.
Kernel threads (KSEs) in a process mask all signals, and only the signal
thread waits for signals to be delivered to the process, the signal thread
is responsible
for dispatching signals to user threads.
.Pp
A downside of this is that if a multiplexed thread
calls the execve() syscall, its signal mask and pending signals may not be
available in the kernel. They are stored
in userland and the kernel does not know where to get them, however POSIX
calls the
.Fn execve
syscall, its signal mask and pending signals may not be
available in the kernel.
They are stored
in userland and the kernel does not know where to get them, however
.Tn POSIX
requires them to be restored and passed them to new process.
Just setting the mask for the thread before calling execve is only a
Just setting the mask for the thread before calling
.Fn execve
is only a
close approximation to the problem as it does not re-deliver back to the kernel
any pending signals that the old process may have blocked, and it allows a
window in which new signals may be delivered to the process between the setting of the mask and the execve().
any pending signals that the old process may have blocked, and it allows a
window in which new signals may be delivered to the process between the setting
of the mask and the
.Fn execve .
.Pp
For now this problem has been solved by adding a special combined
kse_thr_interrupt()/execve() mode to the
.Fn kse_thr_interrupt Ns / Ns Fn execve
mode to the
.Fn kse_thr_interrupt
syscall.
The
The
.Fn kse_thr_interrupt
syscall has a sub command KSE_INTR_EXECVE, that allows it to accept a
.Va kse_execv_args
syscall has a sub command
.Dv KSE_INTR_EXECVE ,
that allows it to accept a
.Vt kse_execv_args
structure, and allowing it to adjust the signals and then atomically
convert into an execve() call.
convert into an
.Fn execve
call.
Additional pending signals and the correct signal mask can be passed
to the kernel in this way. The thread library overrides the execve syscall
and translates it into kse_intr_interrupt call, allowing a multiplexed thread
to restore pending signals and the correct signal mask before doing the exec.
to the kernel in this way.
The thread library overrides the
.Fn execve
syscall
and translates it into
.Fn kse_intr_interrupt
call, allowing a multiplexed thread
to restore pending signals and the correct signal mask before doing the
.Fn exec .
This solution to the problem may change.
.\"
.Ss KSE Mailboxes
.\"
Each KSE has a unique mailbox for user-kernel communication defined in
sys/kse.h. Some of the fields there are:
Each KSE has a unique mailbox for user-kernel communication defined in
.In sys/kse.h .
Some of the fields there are:
.Pp
.Va km_version
describes the version of this structure and must be equal to
@ -466,20 +485,18 @@ each upcall.
.Va km_flags
may contain any of the following bits OR'ed together:
.Bl -tag -width indent
.It \&
KMF_NOUPCALL
block upcalls from happening. The thread is in some critical section.
.It \&
KMF_NOCOMPLETED
.It \&
KMF_DONE
.It \&
KMF_BOUND
.It Dv KMF_NOUPCALL
Block upcalls from happening.
The thread is in some critical section.
.It Dv KMF_NOCOMPLETED , KMF_DONE , KMF_BOUND
This thread should be considerred to be permanently bound to
its KSE, and treated much like a non-threaded process would be.
It is a "long term" version of KMF_NOUPCALL in some ways.
.It \&
KMF_WAITSIGEVENT
It is a
.Dq "long term"
version of
.Dv KMF_NOUPCALL
in some ways.
.It Dv KMF_WAITSIGEVENT
Implement charactersitics needed for the signal delivery thread.
.El
.\"
@ -487,7 +504,9 @@ Implement charactersitics needed for the signal delivery thread.
.\"
Each user thread must have associated with it a unique
.Vt "struct kse_thr_mailbox"
as defined in sys/kse.h. It includes the following fields.
as defined in
.In sys/kse.h .
It includes the following fields.
.Pp
.Va tm_udata
is an opaque pointer ignored by the kernel.
@ -526,9 +545,10 @@ counter is incremented.
.Va tm_flags
may contain any of the following bits OR'ed together:
.Bl -tag -width indent
.It \&
TMF_NOUPCALL
Similar to KMF_NOUPCALL. This flag inhibits upcalling for critical sections.
.It Dv TMF_NOUPCALL
Similar to
.Dv KMF_NOUPCALL .
This flag inhibits upcalling for critical sections.
Some architectures require this to be in one place and some in the other.
.El
.Sh RETURN VALUES

View File

@ -139,12 +139,12 @@ The address given is not page aligned or the length is negative.
Some portion of the indicated address range is not allocated.
.El
.Sh "SEE ALSO"
.Xr mlockall 2 ,
.Xr munlockall 2 ,
.Xr fork 2 ,
.Xr mincore 2 ,
.Xr minherit 2 ,
.Xr mlockall 2 ,
.Xr mmap 2 ,
.Xr munlockall 2 ,
.Xr munmap 2 ,
.Xr setrlimit 2 ,
.Xr getpagesize 3

View File

@ -98,16 +98,16 @@ requires appropriate privilege in all cases, but this behavior was optional
in prior editions of the standard.
.It Li _PC_NO_TRUNC
Return greater than zero if attempts to use pathname components longer than
.Brq Li NAME_MAX
.Brq Dv NAME_MAX
will result in an
.Bq Er ENAMETOOLONG
error; otherwise, such components will be truncated to
.Brq Li NAME_MAX .
.Brq Dv NAME_MAX .
.St -p1003.1-2001
requires the error in all cases, but this behavior was optional in prior
editions of the standard, and some
.No non- Ns Tn POSIX Ns \&-compliant
filesystems do not support this behavior.
.No non- Ns Tn POSIX Ns -compliant
file systems do not support this behavior.
.It Li _PC_VDISABLE
Returns the terminal character disabling value.
.It Li _PC_ASYNC_IO
@ -188,12 +188,12 @@ will fail if:
.It Bq Er ENOTDIR
A component of the path prefix is not a directory.
.It Bq Er ENAMETOOLONG
A component of a pathname exceeded
A component of a pathname exceeded
.Brq Dv NAME_MAX
characters (but see
.Dv _PC_NO_TRUNC
above),
or an entire path name exceeded
or an entire path name exceeded
.Brq Dv PATH_MAX
characters.
.It Bq Er ENOENT

View File

@ -126,11 +126,11 @@ argument to a
function is formed by
.Em or Ap ing
one or more of the values:
.Bl -column MSG_DONTWAIT -offset indent
.Bl -column ".Dv MSG_DONTWAIT" -offset indent
.It Dv MSG_OOB Ta process out-of-band data
.It Dv MSG_PEEK Ta peek at incoming message
.It Dv MSG_WAITALL Ta wait for full request or error
.It Dv MSG_DONTWAIT Ta don't block
.It Dv MSG_DONTWAIT Ta do not block
.El
.Pp
The
@ -139,21 +139,29 @@ flag requests receipt of out-of-band data
that would not be received in the normal data stream.
Some protocols place expedited data at the head of the normal
data queue, and thus this flag cannot be used with such protocols.
The MSG_PEEK flag causes the receive operation to return data
The
.Dv MSG_PEEK
flag causes the receive operation to return data
from the beginning of the receive queue without removing that
data from the queue.
Thus, a subsequent receive call will return the same data.
The MSG_WAITALL flag requests that the operation block until
The
.Dv MSG_WAITALL
flag requests that the operation block until
the full request is satisfied.
However, the call may still return less data than requested
if a signal is caught, an error or disconnect occurs,
or the next data to be received is of a different type than that returned.
The MSG_DONTWAIT flag requests the call to return when it would block otherwise.
If no data is available
The
.Dv MSG_DONTWAIT
flag requests the call to return when it would block otherwise.
If no data is available,
.Va errno
is set to
.Er EAGAIN .
This flag is not available in strict ANSI or C99 compilation mode.
This flag is not available in strict
.Tn ANSI
or C99 compilation mode.
.Pp
The
.Fn recvmsg
@ -292,10 +300,14 @@ The argument
.Fa s
does not refer to a socket.
.It Bq Er EMSGSIZE
The
.Fn recvmsg
system call
was used to receive rights (file descriptors) that were in flight on the
connection. However, the receiving program did not have enough free file
descriptor slots to accept the them. In this case the descriptors are
connection.
However, the receiving program did not have enough free file
descriptor slots to accept the them.
In this case the descriptors are
closed, any pending data can be returned by another call to
.Fn recvmsg .
.It Bq Er EAGAIN

View File

@ -38,7 +38,10 @@
.In sys/socket.h
.In sys/uio.h
.Ft int
.Fn sendfile "int fd" "int s" "off_t offset" "size_t nbytes" "struct sf_hdtr *hdtr" "off_t *sbytes" "int flags"
.Fo sendfile
.Fa "int fd" "int s" "off_t offset" "size_t nbytes"
.Fa "struct sf_hdtr *hdtr" "off_t *sbytes" "int flags"
.Fc
.Sh DESCRIPTION
The
.Fn sendfile
@ -80,7 +83,9 @@ and
.Fa trailers
pointers, if
.Pf non- Dv NULL ,
point to arrays of struct iovec structures.
point to arrays of
.Vt "struct iovec"
structures.
See the
.Fn writev
system call for information on the iovec structure.

View File

@ -220,7 +220,7 @@ and
The following macros are available to test whether a
.Va st_mode
value passed in the
.Ar m
.Fa m
argument corresponds to a file of the specified type:
.Bl -tag -width ".Fn S_ISFIFO m"
.It Fn S_ISBLK m

View File

@ -153,6 +153,6 @@ if it runs out of memory.
The
.Fn fparseln
function first appeared in
.Nx 1.4
and
.Nx 1.4
and
.Fx 4.0 .

View File

@ -104,7 +104,7 @@ The latter do not re-raise exceptions and may preserve
architecture-specific information such as addresses where
exceptions occurred.
.Sh RETURN VALUES
The
The
.Fn feclearexcept ,
.Fn fegetexceptflag ,
.Fn feraiseexcept ,

View File

@ -231,8 +231,8 @@ double sqrt(double n) {
.Xr feupdateenv 3 ,
.Xr fpgetmask 3 ,
.Xr fpgetprec 3 ,
.Xr fpgetsticky 3 ,
.Xr fpgetround 3 ,
.Xr fpgetsticky 3 ,
.Xr fpresetsticky 3 ,
.Xr fpsetmask 3 ,
.Xr fpsetprec 3 ,

View File

@ -468,12 +468,14 @@ and
An explanation of IEEE 754 and its proposed extension p854
was published in the IEEE magazine MICRO in August 1984 under
the title "A Proposed Radix- and Word-length-independent
Standard for Floating-point Arithmetic" by W. J. Cody et al.
Standard for Floating-point Arithmetic" by
.An "W. J. Cody"
et al.
The manuals for Pascal, C and BASIC on the Apple Macintosh
document the features of IEEE 754 pretty well.
Articles in the IEEE magazine COMPUTER vol. 14 no. 3 (Mar.\&
Articles in the IEEE magazine COMPUTER vol.\& 14 no.\& 3 (Mar.\&
1981), and in the ACM SIGNUM Newsletter Special Issue of
Oct. 1979, may be helpful although they pertain to
Oct.\& 1979, may be helpful although they pertain to
superseded drafts of the standard.
.Sh HISTORY
A math library with many of the present functions appeared in

View File

@ -46,7 +46,7 @@ and
.Fn roundf
functions return the nearest integral value to
.Fa x ;
if
if
.Fa x
lies halfway between two integral values, then these
functions return the integral value with the larger