wup_tsk

iwup_tsk

Outline

Wake-up task.

C format

 ER      wup_tsk (ID tskid);
 ER      iwup_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 cancel the WAITING state (sleeping state) of the task specified by parameter tskid.

As a result, the target task is moved from the sleeping state to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.

If the target task is in a state other than the sleeping state when this service call is issued, this service call does not move the state but increments the wake-up request counter (by added 1 to the wake-up request counter).

Note The wake-up request counter managed by the RI600PX is configured in 8-bit widths. If the number of wake-up requests exceeds the maximum count value 255 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 < 0

- tskid > VTMAX_TSK

- When iwup_tsk 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 iwup_tsk was issued from task.

- The wup_tsk was issued from non-task.

- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".

E_MACV

-26

Memory access violation. (only for wup_tsk)

- Stack pointer points out of user stack for invoking task.

E_OBJ

-41

Object state error.

- Specified task is in the DORMANT state.

E_NOEXS

-42

Non-existent object.

- The task specified by tskid does not exist.

E_QOVR

-43

Queuing overflow.

- Wake-up request count exceeded 255.