RTEMS Logo

RTEMS 4.8.0 On-Line Library


Task-Dependent Synchronization Manager wup_tsk - Wakeup Other Task

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

2.3.6: wup_tsk - Wakeup Other Task

CALLING SEQUENCE:

ER wup_tsk(
  ID tskid
);

STATUS CODES:

E_OK - Normal Completion

E_ID - Invalid ID Number (tskid was invalid or could not be used)

E_NOEXS - Object does not exist (the task specified by tskid does not exist)

E_OACV - Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)

E_OBJ - Invalid object state (the specified task is in DORMANT state or the issuing task specified itself)

E_QOVR - Queuing or nesting overflow (wakeup request queuing count will exceed the maximum value allowed for wupcnt)

EN_OBJNO - An object number which could not be accessed on the target node is specified.

EN_CTXID - Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion

DESCRIPTION:

This system call releases the WAIT state of the task specified by tskid caused by the execution of slp_tsk or tslp_tsk.

A task cannot specify itself in this system call. An E_OBJ error will result if a task specifies itself.

If the specified task is not in the WAIT state caused by a slp_tsk or tslp_tsk, the wakeup request based on the wup_tsk call will be queued. In other words, a record will be kept that a wup_tsk has been issued for the specified task and no WAIT state will result even if slp_tsk or tslp_tsk is executed by the task later. This is called queuing for wakeup request.

NOTES:

Wakeup requests are queued as follows. A wakeup request queuing count (wupcnt) is kept in the TCB for each task. Initially (when sta_tsk is executed) the value of wupcnt is 0. Executing wup_tsk on a task which is not waiting for a wakeup increments the wakeup request queuing count by one for the specified task. If slp_tsk or tslp_tsk is executed on that task, its wakeup request queuing count will be decremented by one. If the task with wakeup request queuing count = 0 executes slp_tsk or tslp_tsk, that task will be put in WAIT state rather than decrementing the wakeup request queuing count.

It is always possible to queue at least one wup_tsk (wupcnt = 1); the maximum allowable number for the wakeup request queuing count (wupcnt) is implementation dependent, and may be any number higher than or equal to one. In other words, while the first wup_tsk issued to a task which is not waiting for a wakeup will not result in an error, it is implementation dependent whether or not any further wup_tsk calls on the same task will result in an error. The ability to queue more than one wakeup request is considered an extended function [level X] for which compatibility and connectivity are not guaranteed.

An E_QOVR error will result if wup_tsk is issued more than the maximum value allowed for the wakeup request queuing count (wupcnt).


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

Copyright © 1988-2007OAR Corporation