RTEMS Logo

RTEMS 4.7.1 On-Line Library


Task-Dependent Synchronization Manager tslp_tsk - Sleep Task with Timeout

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

2.3.5: tslp_tsk - Sleep Task with Timeout

CALLING SEQUENCE:

ER ercd =tslp_tsk(
  TMO tmout
);

STATUS CODES:

E_OK - Normal Completion

E_PAR - Parameter error (a timeout value -2 or less was specified)

E_RLWAI - WAIT state was forcibly released (rel_wai was received while waiting)

E_TMOUT - Polling failure or timeout exceeded

E_CTX - Context error (issued from task-independent portions or a task in dispatch disabled state)

DESCRIPTION:

The tslp_tsk system call is the same as slp_tsk but with an additional timeout feature. If a wup_tsk is issued before the period of time specified by tmout elapses, tslp_tsk will complete normally. An E_TMOUT error will result if no wup_tsk is issued before the time specified by tmout expires. Specifying tmout = TMO_FEVR = -1 can be used to set the timeout period to forever (no timeout). In this case, tslp_tsk will function exactly the same as slp_tsk causing the issuing task to wait forever for wup_tsk to be issued.

NOTES:

Since the tslp_tsk system call causes the issuing task to enter WAIT state, tslp_tsk calls may not be nested. It is possible, however, for another task to execute a sus_tsk on a task which has put itself in WAIT state using tslp_tsk. If this happens, the task will enter the combined WAIT-SUSPEND state.

If you simply wish to delay a task (make it wait for a while), use dly_tsk rather than tslp_tsk.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2004 OAR Corporation