1
0
Files
irix-657m-src/eoe/man/man3p/pthread_attr_setschedparam.3p
2022-09-29 17:59:04 +03:00

89 lines
2.0 KiB
Plaintext

'\"macro stdmacro
.\"
.\" ----------------
.TH pthread_attr_setschedparam 3P
.\"
.\" ----------------
.SH NAME
pthread_attr_setschedparam, pthread_attr_getschedparam
\- manage thread scheduling priority attributes
.\"
.\" ----------------
.Op c p a
.SH C SYNOPSIS
.nf
.ft 3
#include <pthread.h>
.HP
.ft 3
int pthread_attr_setschedparam(pthread_attr_t \(**attr,
.br
const struct sched_param \(**param);
.HP
.ft 3
int pthread_attr_getschedparam(const pthread_attr_t \(**attr,
.br
struct sched_param \(**oparam);
.ft 1
.fi
.Op
.\"
.\" ----------------
.SH DESCRIPTION
Scheduling parameters exist to implement scheduling policies [see
.IR pthread_attr_setschedpolicy ()].
The
.I sched_priority
member of the
.I sched_param
structure is a positive integer number (higher values indicate
greater importance).
Priority limits should be retrieved using the interfaces
.IR sched_get_priority_min ()
and
.IR sched_get_priority_max ().
The default scheduling priority is the minimum for the policy.
A portable application should not assume more than 32 distinct priorities.
.\"
.PP
The
.IR pthread_attr_setschedparam ()
function sets the thread scheduling parameters attribute in the object
.IR attr ,
from the values in
.IR param .
In order to use the scheduling parameters from the attribute object the
inherit attribute must be
.B PTHREAD_EXPLICIT_SCHED
(this is the default) [see
.IR pthread_attr_setinheritsched ()].
The current scheduling parameters for the attribute object
.IR attr ,
are returned via the
.I oparam
parameter of
.IR pthread_attr_getschedparam ().
.\"
.\" ----------------
.SH DIAGNOSTICS
On success
.IR pthread_attr_setschedparam ()
returns zero; otherwise an error number is returned:
.TP 15
.B [EINVAL]
The value of
.I param
is out of range.
.\"
.PP
.IR pthread_attr_getschedparam ()
always returns zero.
.\"
.\" ----------------
.SH "SEE ALSO"
pthread_attr_setinheritsched(3P),
pthread_attr_setschedpolicy(3P),
pthread_attr_setscope(3P),
sched_get_priority_max(3P),
sched_get_priority_min(3P).