Everything

chg_pri

ichg_pri

Outline
Change task priority.
C format
 ER      chg_pri ( ID tskid, PRI tskpri );
 
 ER      ichg_pri ( ID tskid, PRI tskpri );

Assembly format
 MOVW    AX, #(tskid | tskpri)
 CALL    !!_chg_pri
 
 MOVW    AX, #(tskid | tskpri)
 CALL    !!_ichg_pri

Parameter(s)
I/O
Parameter
Description
I
 ID      tskid;
ID number of the task whose priority is to be changed.
TSK_SELF: Invoking task.
Value: ID number of the task whose priority is to be changed.
I
 PRI     tskpri;
New current priority of the task.
TPRI_INI: Initial priority of the task.
Value: New current priority of the task.

Explanation
These service calls change the priority of the task specified by parameter tskid (current priority) to a value specified by parameter tskpri.
Note If the target task is in the RUNNING or READY state after this service call is issued, this service call re-queues the task at the end of the ready queue corresponding to the priority specified by parameter tskpri, following priority change processing.
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_OBJ
-41
Object state error (specified task is in the DORMANT state).