thr_getprio

Returns the value associated with the specified key.

Library:LibC
Classification:UNIX International
Service:Threads

Syntax

  #include <thread.h> 
   
  int thr_getprio (
     thread_t   thr,
     int       *pri);
  

Parameters

thr

(IN) Specifies the thread.

pri

(OUT) Points to the location where the priority of the target thread is returned. Valid priorities are specified with the following flags:

Flag

Value

Description

NX_PRIO_HIGH

10

High priority

NX_PRIO_MED

5

Medium priority

NX_PRIO_LOW

1

Low priority

Return Values

If successful, returns 0; otherwise, returns a nonzero error code:

Decimal

Constant

Description

77

NX_ESRCH

The specified thread ID is invalid.

Remarks

The thr_getprio function returns the priority associated with the specified thread. Currently, all threads run at the same priority, regardless of the priority value associated with them.

See Also