summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2004-06-17 17:51:17 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2004-06-17 17:51:17 +0000
commit715a0284551345c8a20678c8e82a50fbe02e95ba (patch)
tree44d1b91a555b9e1e34b9891cf92d4b676d9c4cd1 /share
parentef13db44d1278eaa50be8ba6303f06a5a6011c4d (diff)
downloadsrc-test2-715a0284551345c8a20678c8e82a50fbe02e95ba.tar.gz
src-test2-715a0284551345c8a20678c8e82a50fbe02e95ba.zip
Notes
Diffstat (limited to 'share')
-rw-r--r--share/man/man3/pthread_barrier_destroy.328
-rw-r--r--share/man/man3/pthread_barrierattr.333
-rw-r--r--share/man/man3/pthread_spin_init.324
-rw-r--r--share/man/man3/pthread_spin_lock.320
4 files changed, 51 insertions, 54 deletions
diff --git a/share/man/man3/pthread_barrier_destroy.3 b/share/man/man3/pthread_barrier_destroy.3
index 27ded5b58a0e..cc349ec183a7 100644
--- a/share/man/man3/pthread_barrier_destroy.3
+++ b/share/man/man3/pthread_barrier_destroy.3
@@ -24,13 +24,11 @@
.\"
.\" $FreeBSD$
.\"
-.\" Note: The date here should be updated whenever a non-trivial
-.\" change is made to the manual page.
.Dd February 19, 2004
-.Dt PTHREAD_BARRIER_DESTROY 3 PTHREAD_BARRIER_INIT 3 PTHREAD_BARRIER_WAIT 3
+.Dt PTHREAD_BARRIER 3
.Os
.Sh NAME
-.Nm pthread_barrier_destroy pthread_barrier_init pthread_barrier_wait
+.Nm pthread_barrier_destroy , pthread_barrier_init , pthread_barrier_wait
.Nd "destroy, initialize or wait on a barrier object"
.Sh LIBRARY
.Lb libpthread
@@ -50,7 +48,8 @@ function will initialize
.Fa barrier
with attributes specified in
.Fa attr ,
-or if it is NULL,
+or if it is
+.Dv NULL ,
with default attributes.
The number of threads that must call
.Fn pthread_barrier_wait
@@ -76,27 +75,31 @@ any of them will be released is determined by the
argument to
.Fn pthread_barrier_init .
Once the threads have been released the barrier will be reset.
-.Sh DIAGNOSTICS
+.Sh RETURN VALUES
If successful,
both
.Fn pthread_barrier_destroy
and
.Fn pthread_barrier_init
will return zero.
-Otherwise an error number will be returned to indicate the error.
+Otherwise, an error number will be returned to indicate the error.
If the call to
.Fn pthread_barrier_wait
-is successful all but one of the threads will return zero.
-That one thread will return PTHREAD_BARRIER_SERIAL_THREAD.
-Otherwise an error number will be returned to indicate the error.
+is successful, all but one of the threads will return zero.
+That one thread will return
+.Dv PTHREAD_BARRIER_SERIAL_THREAD .
+Otherwise, an error number will be returned to indicate the error.
.Pp
-None of these functions will return EINTR.
+None of these functions will return
+.Er EINTR .
.Sh IMPLIMENTATION NOTES
In both
.Lb libpthread
and
.Lb libthr
-the PTHREAD_BARRIER_SERIAL_THREAD return value will
+the
+.Dv PTHREAD_BARRIER_SERIAL_THREAD
+return value will
always be returned by the last thread to reach the barrier.
.Sh ERRORS
The
@@ -139,7 +142,6 @@ Insufficient memory to initialize
.Fa barrier .
.El
.Sh SEE ALSO
-.Xr pthread_barrier_wait 3 ,
.Xr pthread_barrierattr 3
.Sh HISTORY
The
diff --git a/share/man/man3/pthread_barrierattr.3 b/share/man/man3/pthread_barrierattr.3
index 2931bdf001e6..cb9e6e29223f 100644
--- a/share/man/man3/pthread_barrierattr.3
+++ b/share/man/man3/pthread_barrierattr.3
@@ -24,14 +24,12 @@
.\"
.\" $FreeBSD$
.\"
-.\" Note: The date here should be updated whenever a non-trivial
-.\" change is made to the manual page.
.Dd February 19, 2004
-.Dt PTHREAD_BARRIERATTR_DESTROY 3 PTHREAD_BARRIERATTR_GETPSHARED 3 PTHREAD_BARRIERATTR_INIT 3 PTHREAD_BARRIERATTR_SETPSHARED 3
+.Dt PTHREAD_BARRIERATTR 3
.Os
.Sh NAME
-.Nm pthread_barrierattr_destroy pthread_barrierattr_getpshared
-.Nm pthread_barrierattr_init pthread_barrierattr_setpshared
+.Nm pthread_barrierattr_destroy , pthread_barrierattr_getpshared ,
+.Nm pthread_barrierattr_init , pthread_barrierattr_setpshared
.Nd "manipulate a barrier attribute object"
.Sh LIBRARY
.Lb libpthread
@@ -69,7 +67,7 @@ The
function will set the process-shared attribute of
.Fa attr
to the value specified in
-.Fa pshared.
+.Fa pshared .
The argument
.Fa pshared
may have one of the following values:
@@ -81,12 +79,12 @@ threads in the same process as the one that created the object.
The barrier object it is attached to may be accessed by
threads in processes other than the one that created the object.
.El
-.Sh DIAGNOSTICS
-If successful all these functions will return zero.
-Otherwise an error number will be returned to indicate the error.
-.Pp
-None of these functions will return EINTR.
+.Sh RETURN VALUES
+If successful, all these functions will return zero.
+Otherwise, an error number will be returned to indicate the error.
.Pp
+None of these functions will return
+.Er EINTR .
.Sh ERRORS
The
.Fn pthread_barrierattr_destroy ,
@@ -122,10 +120,10 @@ is not one of the allowed values.
.Sh SEE ALSO
.Xr pthread_barrier_destroy 3 ,
.Xr pthread_barrier_init 3 ,
-.Xr pthread_barrier_wait 3 ,
+.Xr pthread_barrier_wait 3
.Sh HISTORY
The
-.Fn pthread_barrierattr
+.Fn pthread_barrierattr_*
functions first appeared in
.Lb libpthread
in
@@ -136,15 +134,16 @@ in
.Fx 5.3 .
.Sh BUGS
The implementation of
-.Fn pthread_barriers
+barriers
does not fully conform to
.St -p1003.2
because the process-shared attribute is ignored in
.Lb libthr ,
and in
-.Lb libpthread
+.Lb libpthread ;
if any value other than
.Dv PTHREAD_PROCESSES_PRIVATE
is specified in a call to
-.Fn pthread_barrierattr_setpshared
-it will return EINVAL.
+.Fn pthread_barrierattr_setpshared ,
+it will return
+.Er EINVAL .
diff --git a/share/man/man3/pthread_spin_init.3 b/share/man/man3/pthread_spin_init.3
index 87bce8553294..884753dc96aa 100644
--- a/share/man/man3/pthread_spin_init.3
+++ b/share/man/man3/pthread_spin_init.3
@@ -24,13 +24,11 @@
.\"
.\" $FreeBSD$
.\"
-.\" Note: The date here should be updated whenever a non-trivial
-.\" change is made to the manual page.
.Dd January 22, 2004
-.Dt PTHREAD_SPIN_INIT 3 PTHREAD_SPIN_DESTROY 3
+.Dt PTHREAD_SPIN_INIT 3
.Os
.Sh NAME
-.Nm pthread_spin_init pthread_spin_destroy
+.Nm pthread_spin_init , pthread_spin_destroy
.Nd "initialize or destroy a spin lock"
.Sh LIBRARY
.Lb libpthread
@@ -51,15 +49,15 @@ allocate any resources necessary to begin using it.
If
.Fa pshared
is set to
-.Dv PTHREAD_PROCESS_SHARED
+.Dv PTHREAD_PROCESS_SHARED ,
any thread,
whether belonging to the process in which the spinlock was created or not,
that has access to the memory area where
.Fa lock
-resides can use
+resides, can use
.Fa lock .
If it is set to
-.Dv PTHREAD_PROCESS_PRIVATE
+.Dv PTHREAD_PROCESS_PRIVATE ,
it can only be used by threads within the same process.
.Pp
The
@@ -67,18 +65,17 @@ The
function will destroy
.Fa lock
and release any resources that may have been allocated on its behalf.
-.Pp
-.Sh DIAGNOSTICS
+.Sh RETURN VALUES
If successful,
both
.Fn pthread_spin_init
and
.Fn pthread_spin_destroy
will return zero.
-Otherwise an error number will be returned to indicate the error.
-.Pp
-Neither of these functions will return EINTR.
+Otherwise, an error number will be returned to indicate the error.
.Pp
+Neither of these functions will return
+.Er EINTR .
.Sh ERRORS
The
.Fn pthread_spin_init
@@ -138,4 +135,5 @@ and in
.Lb libpthread
if any value other than
.Dv PTHREAD_PROCESSES_PRIVATE
-is specified it returns EINVAL.
+is specified, it returns
+.Er EINVAL .
diff --git a/share/man/man3/pthread_spin_lock.3 b/share/man/man3/pthread_spin_lock.3
index 0dc4490e3359..64edc82cd925 100644
--- a/share/man/man3/pthread_spin_lock.3
+++ b/share/man/man3/pthread_spin_lock.3
@@ -24,10 +24,8 @@
.\"
.\" $FreeBSD$
.\"
-.\" Note: The date here should be updated whenever a non-trivial
-.\" change is made to the manual page.
.Dd January 22, 2004
-.Dt PTHREAD_SPIN_LOCK 3 PTHREAD_SPIN_TRYLOCK 3 PTHREAD_SPIN_UNLOCK 3
+.Dt PTHREAD_SPIN_LOCK 3
.Os
.Sh NAME
.Nm pthread_spin_lock pthread_spin_trylock pthread_spin_unlock
@@ -49,7 +47,7 @@ The
function will acquire
.Fa lock
if it is not currently owned by another thread.
-If the lock cannot be acquired immediately it will
+If the lock cannot be acquired immediately, it will
spin attempting to acquire the lock (it will not sleep) until
it becomes available.
.Pp
@@ -69,12 +67,12 @@ which must have been previously locked by a call to
.Fn pthread_spin_lock
or
.Fn pthread_spin_trylock .
-.Sh DIAGNOSTICS
-If successful all these functions will return zero.
-Otherwise an error number will be returned to indicate the error.
-.Pp
-None of these functions will return EINTR.
+.Sh RETURN VALUES
+If successful, all these functions will return zero.
+Otherwise, an error number will be returned to indicate the error.
.Pp
+None of these functions will return
+.Er EINTR .
.Sh ERRORS
The
.Fn pthread_spin_lock ,
@@ -115,8 +113,8 @@ The calling thread does not own
.Fa lock .
.El
.Sh SEE ALSO
-.Xr pthread_spin_init 3 ,
-.Xr pthread_spin_destroy 3
+.Xr pthread_spin_destroy 3 ,
+.Xr pthread_spin_init 3
.Sh HISTORY
The
.Fn pthread_spin_lock ,