Use thr_getprio(3C) to get the current priority for the thread. Each thread inherits a priority from its creator. thr_getprio() stores the current priority, tid, in the location pointed to by newprio. For POSIX threads, see pthread_getschedparam Syntax.
#include <thread.h> int thr_getprio(thread_t tid, int *newprio)
thr_getprio() returns 0 if successful. When the following condition is detected, thr_getprio() fails and returns the corresponding value.
ESRCH
Description:The value specified by tid does not refer to an existing thread.