-
chg_pri
ichg_pri
-
ER chg_pri (ID tskid, PRI tskpri);
ER ichg_pri (ID tskid, PRI tskpri);
|
|
|
|
ID tskid;
|
ID number of the task whose priority is to be changed.
Value: ID number of the task whose priority is to be changed.
|
|
PRI tskpri;
|
New base priority of the task.
TPRI_INI: Initial priority.
Value: New base priority.
|
These service calls change the priority of the task specified by parameter
tskid (current priority) to a value specified by parameter
tskpri.
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.
Note When the target task is queued to a wait queue in the order of priority, the wait order may change due to issue of this service call.
Example When three tasks (task A: priority level 10, task B: priority level 11, task C: priority level 12) are queued to the semaphore wait queue in the order of priority, and the priority level of task B is changed from 11 to 9, the wait order will be changed as follows.
|
|
|
|
|
|
|
|
- tskpri > Maximum priority
|
|
|
- tskid > Maximum ID number
- When this service call was issued from a non-task, TSK_SELF was specified tskid.
|
|
|
- This service call was issued int the CPU locked state.
|
|
|
- Specified task is in the DORMANT state.
|
|
|
- Specified task is not registered.
|