summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2004-01-15 23:17:20 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2004-01-15 23:17:20 +0000
commit6f8b45b15a94afedefe401d9bd01083a63d5da34 (patch)
tree7a0fd41367a1b77dd3e907f33e8bd4b6ddf67439 /lib/libpthread
parent77eabeb56b368725bc2067554b126759c2a863de (diff)
man pages for thread_yield and pthread_stackseg_np
jmc asked for them, now he can make them look pretty
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/man/Makefile.inc4
-rw-r--r--lib/libpthread/man/pthread_stackseg_np.350
-rw-r--r--lib/libpthread/man/pthread_yield.327
-rw-r--r--lib/libpthread/man/pthreads.310
4 files changed, 88 insertions, 3 deletions
diff --git a/lib/libpthread/man/Makefile.inc b/lib/libpthread/man/Makefile.inc
index 7aca8757226..5c8773f20f9 100644
--- a/lib/libpthread/man/Makefile.inc
+++ b/lib/libpthread/man/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.17 2003/12/23 22:37:03 brad Exp $
+# $OpenBSD: Makefile.inc,v 1.18 2004/01/15 23:17:19 marc Exp $
# $FreeBSD: Makefile.inc,v 1.6 1999/08/28 00:03:02 peter Exp $
# POSIX thread man files
@@ -52,8 +52,10 @@ MAN+= \
pthread_setspecific.3 \
pthread_sigmask.3 \
pthread_single_np.3 \
+ pthread_stackseg_np.3 \
pthread_suspend_np.3 \
pthread_testcancel.3 \
+ pthread_yield.3 \
sem_destroy.3 \
sem_getvalue.3 \
sem_init.3 \
diff --git a/lib/libpthread/man/pthread_stackseg_np.3 b/lib/libpthread/man/pthread_stackseg_np.3
new file mode 100644
index 00000000000..91db0474326
--- /dev/null
+++ b/lib/libpthread/man/pthread_stackseg_np.3
@@ -0,0 +1,50 @@
+.\" $OpenBSD: pthread_stackseg_np.3,v 1.1 2004/01/15 23:17:19 marc Exp $
+.\"
+.\" PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org>
+.\"
+.Dd January 15, 2004
+.Dt PTHREAD_STACKSEG_NP 3
+.Os
+.Sh NAME
+.Nm pthread_stackseg_np
+.Nd return stack size and location
+.Sh SYNOPSIS
+.Fd #include <sys/signal.h>
+.Fd #include <pthread_np.h>
+.Ft int
+.Fn pthread_stackseg_np "stack_t *sinfo"
+.Sh DESCRIPTION
+The
+.Fn pthread_stackseg_np
+function returns information about the current thread's stack.
+A
+.Fa stack_t
+is the same as a
+.Fa struct sigaltstack
+[see
+.Xr sigaltstack 3 ]
+except the
+.Fa ss_sp
+variable points to the top of the stack instead of the base.
+.Sh RETURN VALUES
+If successful, the
+.Fn pthread_stackseg_np
+function will return 0.
+Otherwise an error number will be returned to indicate the error.
+.Sh ERRORS
+The
+.Fn pthread_stackseg_np
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EAGAIN
+Stack information for the current thread is not currently available.
+There is no guarantee that the current thread's stack information will ever
+become available.
+.El
+.Sh SEE ALSO
+.Xr pthreads 3 ,
+.Xr sigaltstack 3
+.Sh STANDARDS
+.Fn pthread_stackseg_np
+is a non-portable extension to
+.St -p1003.1-01 .
diff --git a/lib/libpthread/man/pthread_yield.3 b/lib/libpthread/man/pthread_yield.3
new file mode 100644
index 00000000000..87803b17d97
--- /dev/null
+++ b/lib/libpthread/man/pthread_yield.3
@@ -0,0 +1,27 @@
+.\" $OpenBSD: pthread_yield.3,v 1.1 2004/01/15 23:17:19 marc Exp $
+.\"
+.\" PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org>
+.\"
+.Dd January 15, 2004
+.Dt PTHREAD_YIELD 3
+.Os
+.Sh NAME
+.Nm pthread_yield
+.Nd yield control of the current thread
+.Sh SYNOPSIS
+.Fd #include <pthread.h>
+.Ft void
+.Fn pthread_yield "void"
+.Sh DESCRIPTION
+The
+.Fn pthread_yield
+function resets the accumulated time slice of the current thread and then
+enters the thread scheduler which resumes execution of the next thread ready
+to run.
+If no other thread is ready to run control returns to the current thread.
+.Sh SEE ALSO
+.Xr pthreads 3
+.Sh STANDARDS
+.Fn pthread_yield
+is a non-portable (but quite common) extension to
+.St -p1003.1-01 .
diff --git a/lib/libpthread/man/pthreads.3 b/lib/libpthread/man/pthreads.3
index db1011387dd..9061868300a 100644
--- a/lib/libpthread/man/pthreads.3
+++ b/lib/libpthread/man/pthreads.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pthreads.3,v 1.22 2004/01/15 11:27:04 jmc Exp $
+.\" $OpenBSD: pthreads.3,v 1.23 2004/01/15 23:17:19 marc Exp $
.\" David Leonard <d@openbsd.org>, 1998. Public domain.
.Dd August 17, 1998
.Dt PTHREADS 3
@@ -171,6 +171,10 @@ Set the name of a thread.
Switch thread scheduling mode.
.It Fn pthread_multi_np
Switch thread scheduling mode.
+.It Fn pthread_stackseg_np
+Return stack size and location.
+.It Fn pthread_yield
+Yield control of the current thread.
.El
.Ss Read/Write Lock Routines
The functions available are as follows:
@@ -513,8 +517,10 @@ environment variable.
.Xr pthread_setspecific 3 ,
.Xr pthread_sigmask 3 ,
.Xr pthread_single_np 3 ,
+.Xr pthread_stackseg_np 3 ,
.Xr pthread_suspend_np 3 ,
-.Xr pthread_testcancel 3
+.Xr pthread_testcancel 3 ,
+.Xr pthread_yield 3
.Sh STANDARDS
The user-level thread library provides functions that
conform to ISO/IEC 9945-1 ANSI/IEEE