mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples:
``.Ar errno'' -> ``.Va errno'' ``.Nm ops'' -> ``.Fa ops'' ``.Va fd'' -> ``.Fa fd''
This commit is contained in:
parent
e466c07526
commit
bb33e42207
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61988
@ -41,9 +41,9 @@ The
|
||||
.Fn aio_cancel
|
||||
function cancels the outstanding asynchronous
|
||||
I/O request for the file descriptor specified in
|
||||
.Ar fildes .
|
||||
.Fa fildes .
|
||||
If
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
is specified, only that specific asynchronous I/O request is cancelled.
|
||||
.Pp
|
||||
Normal asynchronous notification occurs for cancelled requests. Requests
|
||||
@ -83,7 +83,7 @@ An error return from
|
||||
indicates:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EBADF
|
||||
.Ar fildes
|
||||
.Fa fildes
|
||||
is an invalid file descriptor.
|
||||
.El
|
||||
.Sh STANDARDS
|
||||
|
@ -41,7 +41,7 @@ The
|
||||
.Fn aio_error
|
||||
function returns the error status of the asynchronous I/O request
|
||||
associated with the structure pointed to by
|
||||
.Ar iocb .
|
||||
.Fa iocb .
|
||||
.Sh RETURN VALUES
|
||||
If the asynchronous I/O request has completed successfully,
|
||||
.Fn aio_error
|
||||
@ -67,7 +67,7 @@ The
|
||||
function will fail if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EINVAL
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
does not reference an outstanding asynchronous I/O request.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
|
@ -41,13 +41,13 @@
|
||||
The
|
||||
.Fn aio_read
|
||||
function allows the calling process to read
|
||||
.Ar iocb->aio_nbytes
|
||||
.Fa iocb->aio_nbytes
|
||||
from the descriptor
|
||||
.Ar iocb->aio_fildes
|
||||
.Fa iocb->aio_fildes
|
||||
beginning at the offset
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
into the buffer pointed to by
|
||||
.Ar iocb->aio_buf .
|
||||
.Fa iocb->aio_buf .
|
||||
The call returns immediately after the read request has
|
||||
been enqueued to the descriptor; the read may or may not have
|
||||
completed at the time the call returns.
|
||||
@ -55,16 +55,16 @@ completed at the time the call returns.
|
||||
If _POSIX_PRIORITIZED_IO is defined, and the descriptor supports it,
|
||||
then the enqueued operation is submitted at a priority equal to that
|
||||
of the calling process minus
|
||||
.Ar iocb->aio_reqprio .
|
||||
.Fa iocb->aio_reqprio .
|
||||
.Pp
|
||||
The
|
||||
.Ar iocb->aio_lio_opcode
|
||||
.Fa iocb->aio_lio_opcode
|
||||
is ignored by the
|
||||
.Fn aio_read
|
||||
call.
|
||||
.Pp
|
||||
The
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
pointer may be subsequently used as an argument to
|
||||
.Fn aio_return
|
||||
and
|
||||
@ -76,20 +76,20 @@ If the request could not be enqueued (generally due to invalid arguments),
|
||||
then the call returns without having enqueued the request.
|
||||
.Pp
|
||||
If the request is successfully enqueued, the value of
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
can be modified during the request as context, so this value must
|
||||
not be referenced after the request is enqueued.
|
||||
.Sh RESTRICTIONS
|
||||
The Asynchronous I/O Control Block structure pointed to by
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
and the buffer that the
|
||||
.Ar iocb->aio_buf
|
||||
.Fa iocb->aio_buf
|
||||
member of that structure references must remain valid until the
|
||||
operation has completed. For this reason, use of auto (stack) variables
|
||||
for these objects is discouraged.
|
||||
.Pp
|
||||
The asynchronous I/O control buffer
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
should be zeroed before the
|
||||
.Fn aio_read
|
||||
call to avoid passing bogus context information to the kernel.
|
||||
@ -99,9 +99,9 @@ buffer contents after the request has been enqueued, but before the
|
||||
request has completed, are not allowed.
|
||||
.Pp
|
||||
If the file offset in
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
is past the offset maximum for
|
||||
.Ar iocb->aio_fildes ,
|
||||
.Fa iocb->aio_fildes ,
|
||||
no I/O will occur.
|
||||
.Sh RETURN VALUES
|
||||
.Rv -std aio_read
|
||||
@ -126,34 +126,34 @@ call is made, or asynchronously, at any time thereafter. If they
|
||||
are detected at call time,
|
||||
.Fn aio_read
|
||||
returns -1 and sets
|
||||
.Ar errno
|
||||
.Va errno
|
||||
appropriately; otherwise the
|
||||
.Fn aio_return
|
||||
function must be called, and will return -1, and
|
||||
.Fn aio_error
|
||||
must be called to determine the actual calue that would have been
|
||||
returned in
|
||||
.Ar errno .
|
||||
.Va errno .
|
||||
.Pp
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EBADF
|
||||
.Ar iocb->aio_fildes
|
||||
.Fa iocb->aio_fildes
|
||||
is invalid.
|
||||
.It Bq Er EINVAL
|
||||
The offset
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
is not valid, the priority specified by
|
||||
.Ar iocb->aio_reqprio
|
||||
.Fa iocb->aio_reqprio
|
||||
is not a valid priority, or the number of bytes specified by
|
||||
.Ar iocb->aio_nbytes
|
||||
.Fa iocb->aio_nbytes
|
||||
is not valid.
|
||||
.It Bq Er EOVERFLOW
|
||||
The file is a regular file,
|
||||
.Ar iocb->aio_nbytes
|
||||
.Fa iocb->aio_nbytes
|
||||
is greater than zero, the starting offset in
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
is before the end of the file, but is at or beyond the
|
||||
.Ar iocb->aio_fildes
|
||||
.Fa iocb->aio_fildes
|
||||
offset maximum.
|
||||
.El
|
||||
.Pp
|
||||
@ -169,14 +169,14 @@ function is either one of the error returns from the
|
||||
call, or one of:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EBADF
|
||||
.Ar iocb->aio_fildes
|
||||
.Fa iocb->aio_fildes
|
||||
is invalid for reading.
|
||||
.It Bq Er ECANCELED
|
||||
The request was explicitly cancelled via a call to
|
||||
.Fn aio_cancel .
|
||||
.It Bq Er EINVAL
|
||||
The offset
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
would be invalid.
|
||||
.El
|
||||
.Sh STANDARDS
|
||||
@ -196,7 +196,7 @@ manual page was written by
|
||||
.An Terry Lambert Aq terry@whistle.com .
|
||||
.Sh BUGS
|
||||
The value of
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
is ignored. Invalid information in
|
||||
.Ar iocb->_aiocb_private
|
||||
.Fa iocb->_aiocb_private
|
||||
may confuse the kernel.
|
||||
|
@ -41,7 +41,7 @@ The
|
||||
.Fn aio_return
|
||||
function returns the final status of the asynchronous I/O request
|
||||
associated with the structure pointed to by
|
||||
.Ar iocb .
|
||||
.Fa iocb .
|
||||
.Pp
|
||||
.Fn aio_return
|
||||
should only be called once, to obtain the final status of an asynchronous
|
||||
@ -78,7 +78,7 @@ The
|
||||
function will fail if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EINVAL
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
does not reference an outstanding asynchronous I/O request.
|
||||
.El
|
||||
.Sh STANDARDS
|
||||
|
@ -42,23 +42,23 @@ The
|
||||
function suspends the calling process until at least one of the
|
||||
specified asynchronous I/O requests have completed, a signal is
|
||||
delivered, or the
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
has passed.
|
||||
.Pp
|
||||
.Ar iocbs
|
||||
.Fa iocbs
|
||||
is an array of
|
||||
.Ar niocb
|
||||
.Fa niocb
|
||||
pointers to asynchronous I/O requests. Array members containing
|
||||
NULL will be silently ignored.
|
||||
.Pp
|
||||
If
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
is a non-nil pointer, it specifies a maximum interval to suspend.
|
||||
If
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
is a nil pointer, the suspend blocks indefinitely. To effect a
|
||||
poll, the
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
should point to a zero-value timespec structure.
|
||||
.Sh RETURN VALUES
|
||||
If one or more of the specified asynchronous I/O requests have
|
||||
@ -80,10 +80,10 @@ function will fail if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EAGAIN
|
||||
the
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
expired before any I/O requests completed.
|
||||
.It Bq Er EINVAL
|
||||
.Ar iocbs
|
||||
.Fa iocbs
|
||||
contains more than
|
||||
.Dv AIO_LISTIO_MAX
|
||||
asynchronous I/O requests, or at least one of the requests is not
|
||||
|
@ -42,21 +42,21 @@ The
|
||||
function waits for completion of an asynchronous I/O request. Upon completion,
|
||||
.Fn aio_waitcomplete
|
||||
returns the result of the function and sets
|
||||
.Ar iocbp
|
||||
.Fa iocbp
|
||||
to point to the structure associated with the original request. If an
|
||||
asynchronous I/O request is completed before
|
||||
.Fn aio_waitcomplete
|
||||
is called, it returns immediately with the completed request.
|
||||
.Pp
|
||||
If
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
is a non-NULL pointer, it specifies a maximum interval to wait for a
|
||||
asynchronous I/O request to complete. If
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
is a NULL pointer,
|
||||
.Fn aio_waitcomplete
|
||||
waits indefinitely. To effect a poll, the
|
||||
.Ar timeout
|
||||
.Fa timeout
|
||||
argument should be non-NULL, pointing to a zero-valued timeval structure.
|
||||
.Pp
|
||||
The
|
||||
@ -66,10 +66,10 @@ function also serves the function of
|
||||
thus
|
||||
.Fn aio_return
|
||||
should not be called for the control block returned in
|
||||
.Ar iocbp .
|
||||
.Fa iocbp .
|
||||
.Sh RETURN VALUES
|
||||
If an asynchronous I/O request has completed,
|
||||
.Ar iocbp
|
||||
.Fa iocbp
|
||||
is set to point to the control block passed with the original request, and
|
||||
the status is returned as described in
|
||||
.Xr read 2 ,
|
||||
|
@ -40,11 +40,11 @@
|
||||
The
|
||||
.Fn aio_write
|
||||
function allows the calling process to write
|
||||
.Ar iocb->aio_nbytes
|
||||
.Fa iocb->aio_nbytes
|
||||
from the buffer pointed to by
|
||||
.Ar iocb->aio_buf
|
||||
.Fa iocb->aio_buf
|
||||
to the descriptor
|
||||
.Ar iocb->aio_fildes .
|
||||
.Fa iocb->aio_fildes .
|
||||
The call returns immediately after the write request has been enqueued
|
||||
to the descriptor; the write may or may not have completed at the time
|
||||
the call returns. If the request could not be enqueued, generally due
|
||||
@ -54,24 +54,24 @@ request.
|
||||
If
|
||||
.Dv O_APPEND
|
||||
is set for
|
||||
.Ar iocb->aio_fildes ,
|
||||
.Fa iocb->aio_fildes ,
|
||||
.Fn aio_write
|
||||
operations append to the file in the same order as the calls were
|
||||
made. If
|
||||
.Dv O_APPEND
|
||||
is not set for the file descriptor, the write operation will occur at
|
||||
the absolute position from the beginning of the file plus
|
||||
.Ar iocb->aio_offset .
|
||||
.Fa iocb->aio_offset .
|
||||
.Pp
|
||||
If
|
||||
.Dv _POSIX_PRIORITIZED_IO
|
||||
is defined, and the descriptor supports it, then the enqueued
|
||||
operation is submitted at a priority equal to that of the calling
|
||||
process minus
|
||||
.Ar iocb->aio_reqprio .
|
||||
.Fa iocb->aio_reqprio .
|
||||
.Pp
|
||||
The
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
pointer may be subsequently used as an argument to
|
||||
.Fn aio_return
|
||||
and
|
||||
@ -80,20 +80,20 @@ in order to determine return or error status for the enqueued operation
|
||||
while it is in progress.
|
||||
.Pp
|
||||
If the request is successfully enqueued, the value of
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
can be modified during the request as context, so this value must not
|
||||
be referenced after the request is enqueued.
|
||||
.Sh RESTRICTIONS
|
||||
The Asynchronous I/O Control Block structure pointed to by
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
and the buffer that the
|
||||
.Ar iocb->aio_buf
|
||||
.Fa iocb->aio_buf
|
||||
member of that structure references must remain valid until the
|
||||
operation has completed. For this reason, use of auto (stack) variables
|
||||
for these objects is discouraged.
|
||||
.Pp
|
||||
The asynchronous I/O control buffer
|
||||
.Ar iocb
|
||||
.Fa iocb
|
||||
should be zeroed before the
|
||||
.Fn aio_read
|
||||
call to avoid passing bogus context information to the kernel.
|
||||
@ -103,9 +103,9 @@ buffer contents after the request has been enqueued, but before the
|
||||
request has completed, are not allowed.
|
||||
.Pp
|
||||
If the file offset in
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
is past the offset maximum for
|
||||
.Ar iocb->aio_fildes ,
|
||||
.Fa iocb->aio_fildes ,
|
||||
no I/O will occur.
|
||||
.Sh RETURN VALUES
|
||||
.Rv -std aio_write
|
||||
@ -128,26 +128,26 @@ call is made, or asynchronously, at any time thereafter. If they
|
||||
are detected at call time,
|
||||
.Fn aio_write
|
||||
returns -1 and sets
|
||||
.Ar errno
|
||||
.Va errno
|
||||
appropriately; otherwise the
|
||||
.Fn aio_return
|
||||
function must be called, and will return -1, and
|
||||
.Fn aio_error
|
||||
must be called to determine the actual value that would have been
|
||||
returned in
|
||||
.Ar errno .
|
||||
.Va errno .
|
||||
.Pp
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EBADF
|
||||
.Ar iocb->aio_fildes
|
||||
.Fa iocb->aio_fildes
|
||||
is invalid, or is not opened for writing.
|
||||
.It Bq Er EINVAL
|
||||
The offset
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
is not valid, the priority specified by
|
||||
.Ar iocb->aio_reqprio
|
||||
.Fa iocb->aio_reqprio
|
||||
is not a valid priority, or the number of bytes specified by
|
||||
.Ar iocb->aio_nbytes
|
||||
.Fa iocb->aio_nbytes
|
||||
is not valid.
|
||||
.El
|
||||
.Pp
|
||||
@ -163,14 +163,14 @@ function is either one of the error returns from the
|
||||
call, or one of:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EBADF
|
||||
.Ar iocb->aio_fildes
|
||||
.Fa iocb->aio_fildes
|
||||
is invalid for writing.
|
||||
.It Bq Er ECANCELED
|
||||
The request was explicitly canceled via a call to
|
||||
.Fn aio_cancel .
|
||||
.It Bq Er EINVAL
|
||||
The offset
|
||||
.Ar iocb->aio_offset
|
||||
.Fa iocb->aio_offset
|
||||
would be invalid.
|
||||
.El
|
||||
.Sh STANDARDS
|
||||
@ -189,6 +189,6 @@ This manual page was written by
|
||||
.Sh BUGS
|
||||
Asynchronous I/O operations cannot be canceled in this implementation.
|
||||
Invalid information in
|
||||
.Ar iocb->_aiocb_private
|
||||
.Fa iocb->_aiocb_private
|
||||
may confuse the kernel.
|
||||
|
||||
|
@ -79,13 +79,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn bind
|
||||
is implemented as a function which locks
|
||||
.Va s
|
||||
.Fa s
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_bind .
|
||||
Before returning,
|
||||
.Fn bind
|
||||
unlocks
|
||||
.Va s .
|
||||
.Fa s .
|
||||
.Sh RETURN VALUES
|
||||
If the bind is successful, a 0 value is returned.
|
||||
A return value of -1 indicates an error, which is
|
||||
|
@ -116,13 +116,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn close
|
||||
is implemented as a function which locks
|
||||
.Va d
|
||||
.Fa d
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_close .
|
||||
Before returning,
|
||||
.Fn close
|
||||
unlocks
|
||||
.Va d .
|
||||
.Fa d .
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, a value of -1 is returned and the global integer variable
|
||||
|
@ -130,13 +130,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn dup
|
||||
is implemented as a function which locks
|
||||
.Va oldd
|
||||
.Fa oldd
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_dup .
|
||||
Before returning,
|
||||
.Fn dup
|
||||
unlocks
|
||||
.Va oldd .
|
||||
.Fa oldd .
|
||||
.Pp
|
||||
In the non-threaded library
|
||||
.Fn dup2
|
||||
@ -151,17 +151,17 @@ syscall is assembled to
|
||||
and
|
||||
.Fn dup2
|
||||
is implemented as a function which locks both
|
||||
.Va oldd
|
||||
.Fa oldd
|
||||
and
|
||||
.Va newd
|
||||
.Fa newd
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_dup2 .
|
||||
Before returning,
|
||||
.Fn dup2
|
||||
unlocks
|
||||
.Va oldd .
|
||||
.Fa oldd .
|
||||
and
|
||||
.Va newd .
|
||||
.Fa newd .
|
||||
.Sh RETURN VALUES
|
||||
The value -1 is returned if an error occurs in either call.
|
||||
The external variable
|
||||
|
@ -355,13 +355,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn fcntl
|
||||
is implemented as a function which disables thread rescheduling, locks
|
||||
.Va fd
|
||||
.Fa fd
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_fcntl .
|
||||
Before returning,
|
||||
.Fn fcntl
|
||||
unlocks
|
||||
.Va fd
|
||||
.Fa fd
|
||||
and enables thread rescheduling.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, the value returned depends on
|
||||
|
@ -127,13 +127,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn flock
|
||||
is implemented as a function which locks
|
||||
.Va fd
|
||||
.Fa fd
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_flock .
|
||||
Before returning,
|
||||
.Fn flock
|
||||
unlocks
|
||||
.Va fd .
|
||||
.Fa fd .
|
||||
.Sh RETURN VALUES
|
||||
Zero is returned if the operation was successful;
|
||||
on an error a -1 is returned and an error code is left in
|
||||
|
@ -71,13 +71,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn fsync
|
||||
is implemented as a function which locks
|
||||
.Va fd
|
||||
.Fa fd
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_fsync .
|
||||
Before returning,
|
||||
.Fn fsync
|
||||
unlocks
|
||||
.Va fd .
|
||||
.Fa fd .
|
||||
.Sh RETURN VALUES
|
||||
A 0 value is returned on success. A -1 value indicates
|
||||
an error.
|
||||
|
@ -155,13 +155,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn getdirentries
|
||||
is implemented as a function which locks
|
||||
.Va fd
|
||||
.Fa fd
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_getdirentries .
|
||||
Before returning,
|
||||
.Fn getdirentries
|
||||
unlocks
|
||||
.Va fd .
|
||||
.Fa fd .
|
||||
.Sh RETURN VALUES
|
||||
If successful, the number of bytes actually transferred is returned.
|
||||
Otherwise, -1 is returned and the global variable
|
||||
|
@ -73,13 +73,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn getpeername
|
||||
is implemented as a function which locks
|
||||
.Va s
|
||||
.Fa s
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_getpeername .
|
||||
Before returning,
|
||||
.Fn getpeername
|
||||
unlocks
|
||||
.Va s .
|
||||
.Fa s .
|
||||
.Sh RETURN VALUES
|
||||
A 0 is returned if the call succeeds, -1 if it fails.
|
||||
.Sh ERRORS
|
||||
|
@ -71,13 +71,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn getsockname
|
||||
is implemented as a function which locks
|
||||
.Va fd
|
||||
.Fa fd
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_getsockname .
|
||||
Before returning,
|
||||
.Fn getsockname
|
||||
unlocks
|
||||
.Va fd .
|
||||
.Fa fd .
|
||||
.Sh RETURN VALUES
|
||||
A 0 is returned if the call succeeds, -1 if it fails.
|
||||
.Sh ERRORS
|
||||
|
@ -330,13 +330,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn getsockopt
|
||||
is implemented as a function which locks
|
||||
.Va s
|
||||
.Fa s
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_getsockopt .
|
||||
Before returning,
|
||||
.Fn getsockopt
|
||||
unlocks
|
||||
.Va s .
|
||||
.Fa s .
|
||||
.Pp
|
||||
In the non-threaded library
|
||||
.Fn setsockopt
|
||||
@ -351,13 +351,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn setsockopt
|
||||
is implemented as a function which locks
|
||||
.Va s
|
||||
.Fa s
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_setsockopt .
|
||||
Before returning,
|
||||
.Fn setsockopt
|
||||
unlocks
|
||||
.Va s .
|
||||
.Fa s .
|
||||
.Sh RETURN VALUES
|
||||
A 0 is returned if the call succeeds, -1 if it fails.
|
||||
.Sh ERRORS
|
||||
|
@ -42,11 +42,11 @@
|
||||
The function
|
||||
.Fn kldfind
|
||||
returns the fileid of the kld file referenced by
|
||||
.Va file .
|
||||
.Fa file .
|
||||
.Sh RETURN VALUES
|
||||
.Fn kldfind
|
||||
returns the fileid of the kld file referenced by
|
||||
.Va file .
|
||||
.Fa file .
|
||||
Upon error,
|
||||
.Fn kldfind
|
||||
returns -1 and sets
|
||||
|
@ -42,18 +42,18 @@
|
||||
The
|
||||
.Fn kldfirstmod
|
||||
function returns the module id pertaining to the first module referenced by
|
||||
.Va fileid .
|
||||
.Fa fileid .
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn kldfirstmod
|
||||
will return the id of the first module referenced by
|
||||
.Va fileid
|
||||
.Fa fileid
|
||||
or 0 if there are no references.
|
||||
.Sh ERRORS
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er ENOENT
|
||||
The kld file referenced by
|
||||
.Va fileid
|
||||
.Fa fileid
|
||||
was not found.
|
||||
.Sh SEE ALSO
|
||||
.Xr kldfind 2 ,
|
||||
|
@ -68,7 +68,7 @@ There is no memory to load the file into the kernel.
|
||||
The file was not found.
|
||||
.It Bq Er ENOEXEC
|
||||
The file format of
|
||||
.Va file
|
||||
.Fa file
|
||||
was unrecognized.
|
||||
.Sh SEE ALSO
|
||||
.Xr kldfind 2 ,
|
||||
|
@ -42,9 +42,9 @@
|
||||
The
|
||||
.Fn kldstat
|
||||
function writes the info for the file referred to by
|
||||
.Va fileid
|
||||
.Fa fileid
|
||||
into
|
||||
.Va stat .
|
||||
.Fa stat .
|
||||
.Bd -literal
|
||||
struct kld_file_stat {
|
||||
int version; /* set to sizeof(linker_file_stat) */
|
||||
@ -66,13 +66,13 @@ and not
|
||||
itself.
|
||||
.It name
|
||||
The name of the file referred to by
|
||||
.Va fileid .
|
||||
.Fa fileid .
|
||||
.It refs
|
||||
The number of modules referenced by
|
||||
.Va fileid .
|
||||
.Fa fileid .
|
||||
.It id
|
||||
The id of the file specified in
|
||||
.Va fileid .
|
||||
.Fa fileid .
|
||||
.It address
|
||||
The load address of the kld file.
|
||||
.It size
|
||||
@ -82,24 +82,24 @@ The size of the file.
|
||||
seems to always return 0.
|
||||
.Sh ERRORS
|
||||
The information for the file referred to by
|
||||
.Va fileid
|
||||
.Fa fileid
|
||||
is filled into the structure pointed to by
|
||||
.Va stat
|
||||
.Fa stat
|
||||
unless:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er ENOENT
|
||||
The file was not found (probably not loaded).
|
||||
.It Bq Er EINVAL
|
||||
The version specified in the
|
||||
.Va version
|
||||
.Fa version
|
||||
field of stat is not the proper version. You would need to rebuild world, the
|
||||
kernel, or your application, if this error occurs, given that you did properly
|
||||
fill in the
|
||||
.Va version
|
||||
.Fa version
|
||||
field.
|
||||
.It Bq Er EFAULT
|
||||
There was a problem copying one, some, or all of the fields into
|
||||
.Va stat
|
||||
.Fa stat
|
||||
in the
|
||||
.Fn copyout
|
||||
function.
|
||||
|
@ -56,7 +56,7 @@ will return -1 and set
|
||||
to indicate the error.
|
||||
.Sh ERRORS
|
||||
The file referred to by
|
||||
.Va fileid
|
||||
.Fa fileid
|
||||
is unloaded unless:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EPERM
|
||||
|
@ -343,15 +343,15 @@ returned and errno set.
|
||||
.Pp
|
||||
.Fn kevent
|
||||
returns the number of events placed in the
|
||||
.Ar eventlist ,
|
||||
.Fa eventlist ,
|
||||
up to the value given by
|
||||
.Ar nevents .
|
||||
.Fa nevents .
|
||||
If an error occurs while processing an element of the
|
||||
.Ar changelist
|
||||
.Fa changelist
|
||||
and there is enough room in the
|
||||
.Ar eventlist ,
|
||||
.Fa eventlist ,
|
||||
then the event will be placed in the
|
||||
.Ar eventlist
|
||||
.Fa eventlist
|
||||
with
|
||||
.Dv EV_ERROR
|
||||
set in
|
||||
|
@ -55,30 +55,30 @@ Users may only trace their own processes.
|
||||
Only the super-user can trace setuid or setgid programs.
|
||||
.Pp
|
||||
The
|
||||
.Ar tracefile
|
||||
.Fa tracefile
|
||||
gives the pathname of the file to be used for tracing.
|
||||
The file must exist and be a regular file writable by the calling process.
|
||||
All trace records are always appended to the file,
|
||||
so the file must be truncated to zero length to discard
|
||||
previous trace data.
|
||||
If tracing points are being disabled (see KTROP_CLEAR below),
|
||||
.Ar tracefile
|
||||
.Fa tracefile
|
||||
may be NULL.
|
||||
.Pp
|
||||
The
|
||||
.Nm ops
|
||||
.Fa ops
|
||||
parameter specifies the requested ktrace operation.
|
||||
The defined operations are:
|
||||
.Bl -column KTRFLAG_DESCENDXXX -offset indent
|
||||
.It KTROP_SET Enable trace points specified in Ar trpoints .
|
||||
.It KTROP_CLEAR Disable trace points specified in Ar trpoints .
|
||||
.It KTROP_SET Enable trace points specified in Fa trpoints .
|
||||
.It KTROP_CLEAR Disable trace points specified in Fa trpoints .
|
||||
.It KTROP_CLEARFILE Stop all tracing.
|
||||
.It KTRFLAG_DESCEND The tracing change should apply to the
|
||||
specified process and all its current children.
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
.Nm trpoints
|
||||
.Fa trpoints
|
||||
parameter specifies the trace points of interest.
|
||||
The defined trace points are:
|
||||
.Bl -column KTRFAC_SYSCALLXXX -offset indent
|
||||
@ -107,27 +107,27 @@ struct ktr_header {
|
||||
.Ed
|
||||
.Pp
|
||||
The
|
||||
.Nm ktr_len
|
||||
.Va ktr_len
|
||||
field specifies the length of the
|
||||
.Nm ktr_type
|
||||
.Va ktr_type
|
||||
data that follows this header.
|
||||
The
|
||||
.Nm ktr_pid
|
||||
.Va ktr_pid
|
||||
and
|
||||
.Nm ktr_comm
|
||||
.Va ktr_comm
|
||||
fields specify the process and command generating the record.
|
||||
The
|
||||
.Nm ktr_time
|
||||
.Va ktr_time
|
||||
field gives the time (with microsecond resolution)
|
||||
that the record was generated.
|
||||
The
|
||||
.Nm ktr_buf
|
||||
.Va ktr_buf
|
||||
is an internal kernel pointer and is not useful.
|
||||
.Pp
|
||||
The generic header is followed by
|
||||
.Nm ktr_len
|
||||
.Va ktr_len
|
||||
bytes of a
|
||||
.Nm ktr_type
|
||||
.Va ktr_type
|
||||
record.
|
||||
The type specific records are defined in the
|
||||
.Aq Pa sys/ktrace.h
|
||||
|
@ -100,13 +100,13 @@ syscall is assembled to
|
||||
and
|
||||
.Fn listen
|
||||
is implemented as a function which locks
|
||||
.Va s
|
||||
.Fa s
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_listen .
|
||||
Before returning,
|
||||
.Fn listen
|
||||
unlocks
|
||||
.Va s .
|
||||
.Fa s .
|
||||
.Sh RETURN VALUES
|
||||
A 0 return value indicates success; -1 indicates an error.
|
||||
.Sh ERRORS
|
||||
|
@ -274,7 +274,7 @@ was specified and insufficient memory was available.
|
||||
.Xr munmap 2 ,
|
||||
.Xr getpagesize 3
|
||||
.Sh BUGS
|
||||
.Ar len
|
||||
.Fa len
|
||||
is limited to 2GB. Mmapping slightly more than 2GB doesn't work, but
|
||||
it is possible to map a window of size (filesize % 2GB) for file sizes
|
||||
of slightly less than 2G, 4GB, 6GB and 8GB.
|
||||
|
@ -132,7 +132,7 @@ syscall is assembled to
|
||||
and
|
||||
.Fn read
|
||||
is implemented as a function which locks
|
||||
.Va d
|
||||
.Fa d
|
||||
for read, then calls
|
||||
.Fn _thread_sys_read .
|
||||
If the call to
|
||||
@ -141,7 +141,7 @@ would block, a context switch is performed.
|
||||
Before returning,
|
||||
.Fn read
|
||||
unlocks
|
||||
.Va d .
|
||||
.Fa d .
|
||||
.Pp
|
||||
In the non-threaded library
|
||||
.Fn readv
|
||||
@ -156,7 +156,7 @@ syscall is assembled to
|
||||
and
|
||||
.Fn readv
|
||||
is implemented as a function which locks
|
||||
.Va d
|
||||
.Fa d
|
||||
for read, then calls
|
||||
.Fn _thread_sys_readv .
|
||||
If the call to
|
||||
@ -165,7 +165,7 @@ would block, a context switch is performed.
|
||||
Before returning,
|
||||
.Fn readv
|
||||
unlocks
|
||||
.Va d .
|
||||
.Fa d .
|
||||
.Sh RETURN VALUES
|
||||
If successful, the
|
||||
number of bytes actually read is returned.
|
||||
|
@ -50,11 +50,11 @@
|
||||
.Sh DESCRIPTION
|
||||
.Fn Setpgid
|
||||
sets the process group of the specified process
|
||||
.Ar pid
|
||||
.Fa pid
|
||||
to the specified
|
||||
.Ar pgrp .
|
||||
.Fa pgrp .
|
||||
If
|
||||
.Ar pid
|
||||
.Fa pid
|
||||
is zero, then the call applies to the current process.
|
||||
.Pp
|
||||
If the invoker is not the super-user, then the affected process
|
||||
|
@ -139,7 +139,7 @@ syscall is assembled to
|
||||
and
|
||||
.Fn write
|
||||
is implemented as a function which locks
|
||||
.Va d
|
||||
.Fa d
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_write .
|
||||
If the call to
|
||||
@ -148,7 +148,7 @@ would block, a context switch is performed.
|
||||
Before returning,
|
||||
.Fn write
|
||||
unlocks
|
||||
.Va d .
|
||||
.Fa d .
|
||||
.Pp
|
||||
In the non-threaded library
|
||||
.Fn writev
|
||||
@ -163,7 +163,7 @@ syscall is assembled to
|
||||
and
|
||||
.Fn writev
|
||||
is implemented as a function which locks
|
||||
.Va d
|
||||
.Fa d
|
||||
for read and write, then calls
|
||||
.Fn _thread_sys_writev .
|
||||
If the call to
|
||||
@ -172,7 +172,7 @@ would block, a context switch is performed.
|
||||
Before returning,
|
||||
.Fn writev
|
||||
unlocks
|
||||
.Va d .
|
||||
.Fa d .
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion the number of bytes which were written
|
||||
is returned. Otherwise a -1 is returned and the global variable
|
||||
|
Loading…
Reference in New Issue
Block a user