Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chprio(2) — Purdue Xinu

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

create(2)

getprio(2)

resume(2)

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

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026