Everything

sus_tsk

isus_tsk

Outline
Suspend task.
C format
 ER      sus_tsk (ID tskid);
 ER      isus_tsk (ID tskid);
Parameter(s)
I/O
Parameter
Description
I
 ID      tskid;
ID number of the task to be suspended.
TSK_SELF: Invoking task.
Value: ID number of the task to be suspended.

Explanation
These service calls add 0x1 to the suspend request counter for the task specified by parameter tskid, and then move the target task from the RUNNING state to the SUSPENDED state, from the READY state to the SUSPENDED state, or from the WAITING state to the WAITING-SUSPENDED state.
If the target task has moved to the SUSPENDED or WAITING-SUSPENDED state when this service call is issued, the counter manipulation processing is not performed but only the suspend request counter increment processing is executed.
Note The suspend request counter managed by the RI850V4 is configured in 7-bit widths. If the number of suspend requests exceeds the maximum count value 127 as a result of issuing this service call, the counter manipulation processing is therefore not performed but "E_QOVR" is returned.
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.
- When this service call was issued in the dispatching disabled state, invoking task was specified tskid.
E_OBJ
-41
Object state error.
- Specified task is in the DORMANT state.
E_NOEXS
-42
Non-existent object.
- Specified task is not registered.
E_QOVR
-43
Queue overflow.
- Suspension count exceeded 127.