schedsetparam(2) schedsetparam(2)
NAME
schedsetparam - set the scheduling parameters of a process
C SYNOPSIS
#include <sched.h>
int schedsetparam (pidt pid, const struct schedparam *param);
DESCRIPTION
The schedsetparam system call is used to set the scheduling policy
parameters for the process specified by pid. If pid is set to zero, then
the scheduling parameters of the calling process will be affected.
The scheduling parameters of pid are specified by the parameter structure
at address param.
The priority of the target process may be modified by setting the desired
priority value in the sched_priority field of the param structure.
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.
The priority range for these scheduling policies may be obtained via the
schedgetprioritymin(2) and schedgetprioritymax(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 realtime(5).
The calling process must have superuser permissions to successfully
execute schedsetparam.
If the process specified by pid is currently executing or is in a
runnable state, schedsetparam causes the process to be rescheduled at
its new priority.
If pid refers to a POSIX thread process [see pthreads(3P)] then this call
retrieves the scheduling policy parameters that are shared by process
scope threads.
schedsetparam will fail if one or more of the following are true:
[EINVAL] One of the specified parameters at address param are out
of range or scope.
[EPERM] The calling process does not have superuser permissions.
Page 1