thr_getprio(3thread)


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.

References

Intro(3thread), priocntl(2), thr_getscheduler(3thread), thr_setprio(3thread), thr_setscheduler(3thread), thr_yield(3thread)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004