|
NAMErtprio , rtprio_thread —
examine or modify realtime or idle priority
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <sys/types.h>
#include <sys/rtprio.h>
int
int
DESCRIPTIONThertprio () system call is used to lookup or change the
realtime or idle priority of a process, or the calling thread. The
rtprio_thread () system call is used to lookup or
change the realtime or idle priority of a thread.
The function argument specifies the operation to be performed. RTP_LOOKUP to lookup the current priority, and RTP_SET to set the priority. For the For the The *rtp argument is a pointer to a struct rtprio which is used to specify the priority and priority type. This structure has the following form: struct rtprio { u_short type; u_short prio; }; The value of the type field may be
RTP_PRIO_REALTIME for realtime priorities, RTP_PRIO_NORMAL for normal
priorities, and RTP_PRIO_IDLE for idle priorities. The priority specified by
the prio field ranges between 0 and
Realtime and idle priority is inherited through
A realtime thread can only be preempted by a thread of equal or higher priority, or by an interrupt; idle priority threads will run only when no other real/normal priority thread is runnable. Higher real/idle priority threads preempt lower real/idle priority threads. Threads of equal real/idle priority are run round-robin. RETURN VALUESThertprio () and rtprio_thread ()
functions return the value 0 if successful; otherwise the
value -1 is returned and the global variable
errno is set to indicate the error.
ERRORSThertprio () and rtprio_thread ()
system calls will fail if:
SEE ALSOnice(1), ps(1), rtprio(1), setpriority(2), nice(3), mac_priority(4), renice(8), p_cansee(9)AUTHORSThe original author was Henrik Vestergaard Draboel <hvd@terry.ping.dk>. This implementation in FreeBSD was substantially rewritten by David Greenman. Thertprio_thread () system call was implemented by
David Xu.
Visit the GSP FreeBSD Man Page Interface. |