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.
TSK_SELF: Invoking task.
Value: ID number of the task.

Explanation
These service calls move the task specified by parameter tskid 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, these service calls return "E_QOVR".
Note In the RI600V4, the suspend request can not be nested.
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- tskid < 0
- tskid > VTMAX_TSK
- When this service call was issued from a non-task, TSK_SELF was specified for tskid.
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
- The isus_tsk was issued from task.
- The sus_tsk was issued from non-task.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
- The invoking task is specified in the dispatching disabled state.
E_OBJ
-41
Object state error.
- Specified task is in the DORMANT state.
- Specified task is in the RUNNING state when isus_tsk is issued in the dispatching disabled state.
E_QOVR
-43
Queue overflow.
- Specified task is neither in the SUSPENDED state nor WAITING-SUSPENDED state.