1
0
Files
irix-657m-src/eoe/man/man2/sched_setparam.2
2022-09-29 17:59:04 +03:00

76 lines
2.6 KiB
Groff

'\"macro stdmacro
.Op c p a
.TH sched_setparam 2
.SH NAME
\f4sched_setparam\fP \- set the scheduling parameters of a process
.SH C SYNOPSIS
.nf
\f3#include <sched.h>\f1
.sp .6v
\f4int sched_setparam (pid_t \f2pid\fP, const struct sched_param *\f2param\fP);\f1
.fi
.SH DESCRIPTION
The \f4sched_setparam\fP system call is used to set the scheduling
policy parameters for the process specified by \f2pid\fP. If
\f2pid\fP is set to zero, then the scheduling parameters of the calling
process will be affected.
.P
The scheduling parameters of \f2pid\fP are specified by the parameter
structure at address \f2param\fP.
.P
The priority of the target process may be modified by setting
the desired priority value in the sched_priority field of the
\f2param\fP structure.
.P
Unlike IRIX 6.2 and earlier releases, processes having a higher
numerical priority value are more important than processes having a lower
numerical priority value. Specified priorities remain fixed, unless
explicitly changed in the future, and are not affected by priority
aging schemes.
.P
The priority range for these scheduling policies may
be obtained via the \f4sched_get_priority_min\fP(2) and
\f4sched_get_priority_max\fP(2) function calls.
However, arbitrary priority values within the range should not be used.
Developers must consider the needs of the application and how it should
interact with the rest of the system, before selecting a real-time priority.
For more information, see the "Real-Time Priority Band" section of
\f4realtime\fP(5).
.P
The calling process must have superuser permissions to successfully execute
\f4sched_setparam\fP.
.P
If the process specified by \f2pid\fP is currently executing or is in
a runnable state, \f4sched_setparam\fP causes the process to be rescheduled
at its new priority.
.P
If \f2pid\fP refers to a POSIX thread process [see \f4pthreads\fP(3P)]
then this call retrieves the scheduling policy parameters
that are shared by process scope threads.
.P
\f4sched_setparam\fP will fail if one or more of the following are true:
.TP 15
[EINVAL]
One of the specified parameters at address \f2param\fP are out of range or
scope.
.TP
[EPERM]
The calling process does not have superuser permissions.
.TP
[ESRCH]
The process specified by \f2pid\fP does not exist.
.SH SEE ALSO
realtime(5),
sched_getparam(2),
sched_getscheduler(2),
sched_setscheduler(2),
sched_yield(2),
sched_get_priority_max(2),
sched_get_priority_min(2),
sched_rr_get_interval(2),
pthreads(5)
.SH DIAGNOSTICS
Upon successful completion, a value of 0 is returned to the calling process.
Otherwise, a value of -1 is returned and \f4errno\fP is set to indicate
the error.