RTEMS Logo

RTEMS 4.6.0pre5 On-Line Library


Eventflags Manager set_flg - Set Eventflag

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

4.4.3: set_flg - Set Eventflag

CALLING SEQUENCE:

ER set_flg(
  ID flgid,
  UINT setptn
);

STATUS CODES:

E_OK - Normal Completion

E_ID - Invalid ID number (flgid was invalid or could not be used)

E_NOEXS - Object does not exist (the eventflag specified by flgid does not exist)

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

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

EN_PAR - A value outside the range supported by the target node and/or transmission packet format was specified as a parameter (a value outside supported range was specified for setptn or clrptn)

DESCRIPTION:

The set_flg system call sets the bits specified by setptn of the one word eventflag specified by flgid. In other words, a logical sum is taken for the values of the eventflag specified by flgid with the value of setptn.

If the eventflag value is changed by set_flg and the new eventflag value satisfies the condition to release the WAIT state of the task which issued wai_flg on the eventflag, the WAIT state of that task will be released and the task will be put into RUN or READY state (or SUSPEND state if the task was in WAIT-SUSPEND).

Nothing will happen to the target eventflag if all bits of setptn are specified as 0 with set_flg. No error will result in either case.

Multiple tasks can wait for a single eventflag if that eventflags has the TA_WMUL attribute. This means that even eventflags can make queues for tasks to wait on. When such eventflags are used, a single set_flg call may result in the release of multiple waiting tasks. In this case, the order of tasks on the ready queue after the WAIT state is cleared is preserved for tasks having the same priority.

NOTES:

Multiprocessing is not supported. Thus none of the "EN_" status codes will be returned.


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

Copyright © 1988-2003 OAR Corporation