SETBLEV(2) — Unix Programmer’s Manual
NAME
setblev − set scheduling priority level for specified process
SYNOPSIS
int setblev (pid, level)
int pid;
int level;
DESCRIPTION
Setblev is used to set the scheduling base level of a process specified by pid. The specified level must lie in the range 0 to 31; if it is outside this range, it will be set to 0, or to 31 (whichever is closer).
If pid is negative, the setblev call applies to the current process.
Setblev will fail if:
The pid is positive and no process exists with that pid. [ESRCH]
The current process is not the superuser, and either the specified level is greater than the current level, or the effective user ID of the current process is not the same as that of the process indicated by pid. [EPERM]
RETURN VALUE
Zero is returned normally; -1 is returned in the event of error.
COMMENTS
This call is actually implemented via a common "utssys" entry point, also used by uname, ustat, halt, getctty, wracct, and reboot.
SEE ALSO
COMPATIBILITY
The setblev system call is not in any standard UNIX system (UNIX/V7, System III, or VM/UNIX). It should not be used if portability is a primary consideration. The nice (2) call is less powerful, and is somewhat inappropriate for the UNIMAX scheduler, but it may be used if portability is important.
7th Edition