thr_getprio() returns 0 if successful. When the following condition is detected, thr_getprio() fails and returns the corresponding value.
ESRCH
The value specified by tid does not refer to an existing thread.