Everything

get_pri

iget_pri

Outline
Reference task priority.
C format
 ER      get_pri (ID tskid, PRI *p_tskpri);
 ER      iget_pri (ID tskid, PRI *p_tskpri);
Parameter(s)
I/O
Parameter
Description
I
 ID      tskid;
ID number of the task to reference.
TSK_SELF: Invoking task.
Value: ID number of the task to reference.
O
 PRI     *p_tskpri;
Current priority of specified task.

Explanation
Stores current priority of the task specified by parameter tskid in the area specified by parameter p_tskpri.
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- tskid < 0x0
- tskid > Maximum ID number
- When this service call was issued from a non-task, TSK_SELF was specified tskid.
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
E_OBJ
-41
Object state error.
- Specified task is in the DORMANT state.
E_NOEXS
-42
Non-existent object.
- Specified task is not registered.