dly_tsk

Outline

Delay task.

C format

 ER      dly_tsk ( RELTIM dlytim );


Assembly format

 MOVW    BC, #dlytim_hi
 MOVW    AX, #dlytim_lo
 CALL    !!_dly_tsk


Parameter(s)

I/O

Parameter

Description

I

 RELTIM  dlytim;
Amount of relative time to delay the invoking task (unit: ticks).



Explanation

This service call moves the invoking task from the RUNNING state to the WAITING state (delayed state).

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

The delayed state is cancelled in the following cases, and then moved to the READY state.

Delayed State Cancel Operation

Return Value

Delay time specified by parameter dlytim has elapsed.

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_RLWAI

-49

Forced release from waiting (accept rel_wai/irel_wai while waiting).