slp_tsk

Outline

Put task to sleep (waiting forever).

C format

 ER      slp_tsk (void);
Parameter(s)

None.

Explanation

As a result, the invoking task is unlinked from the ready queue and excluded from the RI600PX scheduling subject.

If a wake-up request has been queued to the target task (the wake-up request counter > 0) when this service call is issued, this service call does not move the state but decrements the wake-up request counter (by subtracting 1 from the wake-up request counter).

The sleeping state is cancelled in the following cases.

Sleeping State Cancel Operation

Return Value

A wake-up request was issued as a result of issuing wup_tsk.

E_OK

A wake-up request was issued as a result of issuing iwup_tsk.

E_OK

Forced release from waiting (accept rel_wai while waiting).

E_RLWAI

Forced release from waiting (accept irel_wai while waiting).

E_RLWAI



Return value

Macro

Value

Description

E_OK

0

Normal completion.

E_CTX

-25

Context error.

- This service call was issued from a non-task.

- This service call was issued in the CPU locked state.

- This service call was issued in the dispatching disabled state.

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

E_MACV

-26

Memory access violation.

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

E_RLWAI

-49

Forced release from the WAITING state.

- Accept rel_wai/irel_wai while waiting.