![]() |
![]() |
![]() |
Get the priority of a given process
#include <sched.h> int getprio( pid_t pid );
libc
The getprio() function returns the current priority of thread 1 in process pid. If pid is zero, the priority of the calling thread is returned.
The priority, or -1 if an error occurred (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
The getprio() and setprio() functions are included in the QNX 6 libraries for porting QNX 4 applications; they shouldn't be used in new multi-threaded programs.
errno, sched_get_priority_max(), sched_get_priority_min(), sched_getparam(), sched_getscheduler(), sched_setscheduler(), sched_yield(), setprio()
![]() |
![]() |
![]() |