RTEMS Logo

RTEMS 4.9.3 On-Line Library


Eventflags Manager ref_flg - Reference Eventflag Status

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

4.4.8: ref_flg - Reference Eventflag Status

CALLING SEQUENCE:

ER ref_flg(
  T_RFLG *pk_rflg,
  ID flgid );

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.)

E_PAR - Parameter error (the packet address for the return parameters could not be used)

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_RPAR - A value outside the range supported by the requesting node and/or transmission packet format was returned as a parameter (a value outside supported range was specified for exinf, wtsk and/or flgptn)

DESCRIPTION:

This system call refers to the state of the eventflag specified by flgid, and returns its current flag pattern (flgptn), waiting task information (wtsk), and its extended information (exinf).

Depending on the implementation, wtsk may be returned as the ID (non-zero) of the task waiting for the eventflag. If there are multiple tasks waiting for the eventflag (only when attribute is TA_WMUL), the ID of the task at the head of the queue is returned.

An E_NOEXS error will result if the eventflag specified to ref_flg does not exist.

NOTES:

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

Although both ref_flg and pol_flg can be used to find an eventflag's pattern (flgptn) without causing the issuing task to wait, ref_flg simply reads the eventflag's pattern (flgptn) while pol_flg functions is identical to wai_flg when wait release conditions are satisfied (it clears the eventflag if TWF_CLR is specified).

Depending on the implementation, additional information besides wtsk and flgptn (such as eventflag attributes, flgatr) may also be referred.


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

Copyright © 1988-2008 OAR Corporation