summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-08-11 16:15:56 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-08-11 16:15:56 +0000
commitecd79aff79f0c480f7aa11c77f73d2ca1119605e (patch)
tree6f78dc62c6bdf653e058367549af6889f2ce7b0c /lib/libpthread
parent089676d85e807727d97bd81bdb81d3dc86d88fd7 (diff)
manpage for pthread_[get|set]schedparam; from FreeBSD.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/man/Makefile.inc9
-rw-r--r--lib/libpthread/man/pthread_schedparam.389
2 files changed, 95 insertions, 3 deletions
diff --git a/lib/libpthread/man/Makefile.inc b/lib/libpthread/man/Makefile.inc
index adf22cfa5ab..2b8d0887880 100644
--- a/lib/libpthread/man/Makefile.inc
+++ b/lib/libpthread/man/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.9 2001/08/04 13:56:19 fgsch Exp $
+# $OpenBSD: Makefile.inc,v 1.10 2001/08/11 16:15:55 fgsch Exp $
# $FreeBSD: Makefile.inc,v 1.6 1999/08/28 00:03:02 peter Exp $
# POSIX thread man files
@@ -43,6 +43,7 @@ MAN+= \
pthread_rwlockattr_getpshared.3 \
pthread_rwlockattr_init.3 \
pthread_rwlockattr_setpshared.3 \
+ pthread_schedparam.3 \
pthread_self.3 \
pthread_set_name_np.3 \
pthread_setspecific.3 \
@@ -80,5 +81,7 @@ MLINKS+=flockfile.3 funlockfile.3 \
pthread_mutexattr.3 pthread_mutexattr_setprioceiling.3 \
pthread_mutexattr.3 pthread_mutexattr_setprotocol.3 \
pthread_mutexattr.3 pthread_mutexattr_setpshared.3 \
- pthread_mutexattr.3 pthread_mutexattr_settype.3
-
+ pthread_mutexattr.3 pthread_mutexattr_settype.3 \
+ pthread_schedparam.3 pthread_getschedparam.3 \
+ pthread_schedparam.3 pthread_setschedparam.3
+
diff --git a/lib/libpthread/man/pthread_schedparam.3 b/lib/libpthread/man/pthread_schedparam.3
new file mode 100644
index 00000000000..ba98179720f
--- /dev/null
+++ b/lib/libpthread/man/pthread_schedparam.3
@@ -0,0 +1,89 @@
+.\" $OpenBSD: pthread_schedparam.3,v 1.1 2001/08/11 16:15:55 fgsch Exp $
+.\" Copyright (C) 2000 Jason Evans <jasone@freebsd.org>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice(s), this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified other than the possible
+.\" addition of one or more copyright notices.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice(s), this list of conditions and the following disclaimer in
+.\" the documentation and/or other materials provided with the
+.\" distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD: src/lib/libc_r/man/pthread_schedparam.3,v 1.4 2001/07/15 07:53:27 dd Exp $
+.Dd May 1, 2000
+.Dt PTHREAD_SCHEDPARAM 3
+.Os
+.Sh NAME
+.Nm pthread_setschedparam ,
+.Nm pthread_getschedparam
+.Nd thread scheduling parameter manipulation
+.Sh SYNOPSIS
+.Fd #include <pthread.h>
+.Ft int
+.Fn pthread_setschedparam "pthread_t thread" "int policy" "const struct sched_param *param"
+.Ft int
+.Fn pthread_getschedparam "pthread_t thread" "int *policy" "struct sched_param *param"
+.Sh DESCRIPTION
+The
+.Fn pthread_setschedparam
+and
+.Fn pthread_getschedparam
+functions set and get the scheduling parameters of individual threads.
+The scheduling policy for a thread can either be
+.Dv SCHED_FIFO
+(first in, first out) or
+.Dv SCHED_RR
+(round-robin).
+The thread priority (accessed via
+.Va param->sched_priority )
+must be at least
+.Dv PTHREAD_MIN_PRIORITY
+and no more than
+.Dv PTHREAD_MAX_PRIORITY .
+.Sh RETURN VALUES
+If successful, these functions return 0.
+Otherwise, an error number is returned to indicate the error.
+.Sh ERRORS
+.Fn pthread_setschedparam
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+Invalid value for
+.Va policy .
+.It Bq Er ENOTSUP
+Invalid value for scheduling parameters.
+.It Bq Er ESRCH
+Non-existent thread
+.Va thread .
+.El
+.Pp
+.Fn pthread_getschedparam
+will fail if:
+.Bl -tag -width Er
+.It Bq Er ESRCH
+Non-existent thread
+.Va thread .
+.El
+.Sh STANDARDS
+.Fn pthread_setschedparam
+and
+.Fn pthread_getschedparam
+conform to
+.St -susv2