sched_setparam(3P4) — (M88K only)
NAME
sched_setparam − POSIX 1003.4 set scheduling parameters for a process
SYNOPSIS
#include <sched.h>
int sched_setparam(pid, param)
pid_t pid;
struct sched_param ∗param;
DESCRIPTION
The sched_setparam() function sets the scheduling parameters of the process specified by pid to the values specified in the structure pointed to by param. The only supported scheduling parameter is the priority value. The value of the sched_priority member in the sched_param structure shall be any integer within the priority range for the current scheduling policy of the process specified by pid. Higher numerical values for the priority represent more favorable priorities. The highest priority process which is ready to run is always scheduled first.
If the pid specified is zero, the scheduling parameters of the current process are changed.
To set the priority of a process to a higher value, the user must either be super-user or have the ACC_SETPRI bit set in the access vector (if access vectors are configured). To change the priority of another process, the current process must have an effective user ID that matches the real or effective user ID of the target process, be super-user, or have the ACC_SETPRI bit set in the access vector (if access vectors are configured).
RETURN VALUE
The sched_setparam() function returns 0 if it succeeds in setting the scheduling parameters of the process specified by pid. If the sched_setparam() function fails to complete successfully, the priority remains unchanged; a value of -1 is returned; and errno is set to indicate the error. Possible errors are:
[EINVAL] The requested priority is outside the range of the specified pid’s scheduling policy.
[EPERM] The calling process attempted to change the scheduling parameters of another process and the calling process is not super-user, does not have the ACC_SETPRI bit set in the access vector (if access vectors are configured), and does not have an effective user ID that matches the real or effective user ID of the target process.
[EPERM] A non super-user who does not have the ACC_SETPRI access vector attempted to change a process priority to a higher value.
[ESRCH] No process can be found corresponding to that specified by pid
FILES
/usr/lib/libposix4.a
SEE ALSO
sched_setscheduler(3P4), sched_getscheduler(3P4), sched_getparam(3P4), sched_get_priority_max(3P4), CX/RT Reference Manual.
WARNING
The interface to sched_setparam() is based on IEEE Draft Standard P1003.4/D12. This is an unapproved draft, subject to change. Use of information contained in this unapproved draft is at your own risk. This interface will change to reflect any changes made by future drafts of POSIX 1003.4.
CX/UX Programmer’s Reference Manual