thr_getprio --
retrieve a thread's scheduling priority
Synopsis
cc [options] -Kthread file
#include <thread.h>
int thr_getprio(thread_t tid, int *prio);
Description
thr_getprio
stores tid's scheduling priority
in the location pointed to by prio.
thr_getscheduler can also be used to retrieve the priority
of a thread,
but thr_getprio is a shorthand for use when only the priority,
not the scheduling class, is needed.
Security restrictions
No privileges or special permissions are required to use thr_getprio.
Parameters
tid
target thread ID
prio
pointer to priority value (set by thr_getprio)
Return values
thr_getprio returns zero for success
and an error number for failure, as described below.
Errors
If any of the following error conditions is detected,
thr_getprio returns the corresponding value:
ESRCH
No thread with identifier tid can be found in the process.