tk_dly_tsk
Delay Task
See Also
ER ercd = tk_dly_tsk ( RELTIM dlytim ) ;
RELTIM dlytim Delay time
ER ercd Error code
E_OK Normal completion
E_NOMEM Insufficient memory
E_PAR Parameter error (dlytim is invalid)
E_CTX Context error (issued from task-independent portion or in dispatch disabled state)
E_RLWAI Wait state released (tk_rel_wai received in wait state)
Temporarily stops execution of the invoking task and waits for time dlytim to elapse. The state while the task waits for the delay time to elapse is a WAIT state and is subject to release by tk_rel_wai.
If the task issuing this system call goes to SUSPEND state or WAIT-SUSPEND state while it is waiting for the delay time to elapse, the time continues to be counted in the SUSPEND state.
The time base for dlytim (time unit) is the same as that for system time (= 1 ms).
This system call differs from tk_slp_tsk in that normal completion, not an error code, is returned when the delay time elapses and tk_dly_tsk terminates. Moreover, the wait is not released even if tk_wup_tsk is executed during the delay time. The only way to terminate tk_dly_tsk before the delay time elapses is by calling tk_ter_tsk or tk_rel_wai.
E_DISWAI does not exist in error codes. This is because in µT-Kernel, there is no wait-disabled function.

Comments
Click here to Post a Comment