CHPRIO(2)
NAME
chprio − change the priority of a process
SYNOPSIS
int chprio(pid,newprio)
int pid;
int newprio;
DESCRIPTION
Chprio changes the scheduling priority of process pid to newprio. Priorities are positive integers. At any instant, the highest priority process that is ready will be running. A set of processes with equal priority is scheduled round-robin.
If the new priority is invalid, or the process id is invalid chprio returns SYSERR. Otherwise, it returns the old process priority. It is forbidden to change the priority of the null process, which always remains zero.
SEE ALSO
create(2), getprio(2), resume(2)
BUGS
Because chprio changes priorities without rearranging processes on the ready list, it should only be used on waiting, sleeping, suspended, or current processes.
December 01, 1986 — Xinu Programmer’s Manual