SETPPRI(2) — Kubota Pacfic Computer Inc. (System Calls)
NAME
setppri − set process priority
SYNOPSIS
int setppri (pid, pri)
int pid, pri;
DESCRIPTION
setppri sets the priority of the specified process to the indicated priority.
Setting the process priority to a positive value has little effect since the normal system priority will quickly override whatever positive priority is set. Setting the process priority to a negative value makes the process into a real-time process.
Real-time processes are scheduled differently from normal processes. Real-time processes never have their priority altered by the kernel. Real-time processes are scheduled before any non real-time process and execute until either they voluntarily relinquish the CPU, another real-time process of higher (smaller numeric) priority becomes ready to run, or the process expires its time slice and another real-time process of the same priority is ready to run.
The process nice value has no effect on real-time processes and the nice value does not affect real-time process priority values.
Real-time processes can be quite dangerous, since a real-time process in an infinite loop cannot be interrupted by any other process (other than a real-time process of higher priority).
setppri may be invoked only by the super-user.
setppri fails if one or more of the following are true:
[EINVAL] The pid does not correspond to any current process in the system.
[EINVAL] The pri value specified is not between -128 and +127, inclusive.
SEE ALSO
DIAGNOSTICS
setppri returns zero on successful execution. Otherwise a value of -1 is returned and errno is set to indicate the error.
September 02, 1992