diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 16:08:12 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 16:08:12 -0400 |
| commit | b9cde963555b6519c5dbd34a39dee3418f593437 (patch) | |
| tree | 453accad3c3286e3416d4160de4a87223aff684c /static/freebsd/man3/pthread_schedparam.3 | |
| parent | 5cb84ec742fd33f78c8022863fadaa8d0d93e176 (diff) | |
feat: Added FreeBSD man pages
Diffstat (limited to 'static/freebsd/man3/pthread_schedparam.3')
| -rw-r--r-- | static/freebsd/man3/pthread_schedparam.3 | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/static/freebsd/man3/pthread_schedparam.3 b/static/freebsd/man3/pthread_schedparam.3 new file mode 100644 index 00000000..3ba17578 --- /dev/null +++ b/static/freebsd/man3/pthread_schedparam.3 @@ -0,0 +1,100 @@ +.\" 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. +.\" +.Dd October 17, 2022 +.Dt PTHREAD_SCHEDPARAM 3 +.Os +.Sh NAME +.Nm pthread_setschedparam , +.Nm pthread_getschedparam +.Nd thread scheduling parameter manipulation +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In 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 *restrict policy" "struct sched_param *restrict 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), +.Dv SCHED_RR +(round-robin), or +.Dv SCHED_OTHER +(timesharing). +Valid thread priorities (accessed via +.Va param->sched_priority ) +must be within the range returned by the +.Xr sched_get_priority_min 2 +and +.Xr sched_get_priority_max 2 +system calls. +.Sh RETURN VALUES +If successful, these functions return 0. +Otherwise, an error number is returned to indicate the error. +.Sh ERRORS +The +.Fn pthread_setschedparam +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +Invalid value for +.Fa policy . +.It Bq Er ENOTSUP +Invalid value for scheduling parameters. +.It Bq Er EPERM +The calling thread does not have sufficient privilege to perform the operation. +.It Bq Er ESRCH +Non-existent thread +.Fa thread . +.El +.Pp +The +.Fn pthread_getschedparam +function will fail if: +.Bl -tag -width Er +.It Bq Er ESRCH +Non-existent thread +.Fa thread . +.El +.Sh SEE ALSO +.Xr sched_get_priority_max 2 , +.Xr sched_get_priority_min 2 +.Sh STANDARDS +The +.Fn pthread_setschedparam +and +.Fn pthread_getschedparam +functions conform to +.St -susv2 . |
