Markup tidying.

This commit is contained in:
Ruslan Ermilov 2004-07-02 16:45:56 +00:00
parent 0fe4fb09bc
commit 26b6c45a92
6 changed files with 37 additions and 16 deletions

View File

@ -26,6 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 15, 2000
.Dt SEM_DESTROY 3
.Os
@ -47,7 +48,7 @@ After a successful call to
.Fn sem_destroy ,
.Fa sem
is unusable until re-initialized by another call to
.Fn sem_init .
.Xr sem_init 3 .
.Sh RETURN VALUES
.Rv -std sem_destroy
.Sh ERRORS
@ -56,7 +57,9 @@ The
function will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The
.Fa sem
argument
points to an invalid semaphore.
.It Bq Er EBUSY
There are currently threads blocked on the semaphore that
@ -72,11 +75,12 @@ The
function conforms to
.St -p1003.1-96 .
.Pp
POSIX does not define the behavior of
.Tn POSIX
does not define the behavior of
.Fn sem_destroy
if called while there are threads blocked on
.Fa sem ,
but this implementation is guaranteed to return -1 and set
but this implementation is guaranteed to return \-1 and set
.Va errno
to
.Er EBUSY

View File

@ -26,6 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 15, 2000
.Dt SEM_GETVALUE 3
.Os
@ -56,7 +57,9 @@ The
function will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The
.Fa sem
argument
points to an invalid semaphore.
.El
.Sh SEE ALSO
@ -71,6 +74,8 @@ function conforms to
.St -p1003.1-96 .
.Pp
The value of the semaphore is never negative, even if there are threads blocked
on the semaphore. POSIX is somewhat ambiguous in its wording with regard to
on the semaphore.
.Tn POSIX
is somewhat ambiguous in its wording with regard to
what the value of the semaphore should be if there are blocked waiting threads,
but this behavior is conformant, given the wording of the specification.

View File

@ -26,6 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 15, 2000
.Dt SEM_INIT 3
.Os
@ -71,8 +72,10 @@ The
function will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The
.Fa value
exceeds SEM_VALUE_MAX.
argument exceeds
.Dv SEM_VALUE_MAX .
.It Bq Er ENOSPC
Memory allocation error.
.It Bq Er EPERM
@ -95,7 +98,9 @@ by setting
.Va errno
to
.Er EPERM .
This is perhaps a stretch of the intention of POSIX, but is
This is perhaps a stretch of the intention of
.Tn POSIX ,
but is
compliant, with the caveat that
.Fn sem_init
always reports a permissions error when an attempt to create a shared semaphore

View File

@ -26,6 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd January 15, 2003
.Dt SEM_OPEN 3
.Os
@ -38,8 +39,8 @@
.Lb libc
.Sh SYNOPSIS
.In semaphore.h
.Ft sem_t *
.Fn sem_open "const char *name" "int oflag" "..."
.Ft "sem_t *"
.Fn sem_open "const char *name" "int oflag" ...
.Ft int
.Fn sem_close "sem_t *sem"
.Ft int
@ -50,10 +51,10 @@ The
function creates or opens the named semaphore specified by
.Fa name .
The returned semaphore may be used in subsequent calls to
.Fn sem_getvalue ,
.Fn sem_wait ,
.Fn sem_trywait ,
.Fn sem_post
.Xr sem_getvalue 3 ,
.Xr sem_wait 3 ,
.Xr sem_trywait 3 ,
.Xr sem_post 3 ,
and
.Fn sem_close .
.Pp
@ -70,8 +71,7 @@ must be of type
.Vt mode_t
and specifies the mode for the semaphore.
Only the
.Dv S_IWUSR ,
.Dv S_IWGRP ,
.Dv S_IWUSR , S_IWGRP ,
and
.Dv S_IWOTH
bits are examined;
@ -137,7 +137,7 @@ function will fail if:
.It Bq Er EACCES
The semaphore exists and the permissions specified by
.Fa oflag
at the time it was created deny access to the this process.
at the time it was created deny access to this process.
.It Bq Er EACCES
The semaphore does not exist, but permission to create it is denied.
.It Bq Er EEXIST

View File

@ -26,6 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 15, 2000
.Dt SEM_POST 3
.Os
@ -60,7 +61,9 @@ The
function will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The
.Fa sem
argument
points to an invalid semaphore.
.El
.Sh SEE ALSO

View File

@ -26,6 +26,7 @@
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 15, 2000
.Dt SEM_WAIT 3
.Os
@ -54,7 +55,8 @@ The
.Fn sem_trywait
function decrements (locks) the semaphore pointed to by
.Fa sem
only if the value is non-zero. Otherwise, the semaphore is not decremented and
only if the value is non-zero.
Otherwise, the semaphore is not decremented and
an error is returned.
.Sh RETURN VALUES
.Rv -std
@ -66,7 +68,9 @@ and
functions will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The
.Fa sem
argument
points to an invalid semaphore.
.El
.Pp