RTEMS ITRON 3.0 API User's Guide
ER twai_flg( UINT *p_flgptn, ID flgid, UINT waiptn, UINT wfmode, TMO tmout );
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 (waiptn = 0, wfmode invalid, or tmout is -2
or less)
E_OBJ
- Invalid object state (multiple tasks waiting for an
eventflag with the TA_WSGL attribute)
E_DLT
- The object being waited for was deleted (the specified
eventflag was deleted while waiting)
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)
EN_OBJNO
- An object number which could not be accessed on the
target node is specified.
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 waiptn and tmout)
EN_RPAR
- A value outside the range supported by the requesting
node and/or transmission packet format was specified as a parameter (a
value exceeding the range for the requesting node was specified for
flgptn)
The twai_flg
system call has the same function as wai_flg
with an additional timeout feature. A maximum wait time (timeout value)
can be specified using the parameter tmout
. When a timeout is specified,
a timeout error, E_TMOUT
, will result and the system call will
finish if the period specified by tmout
elapses without conditions for
releasing wait being satisfied.
Specifying TMO_POL = 0
to twai_flg
for tmout
indicates that
a timeout value of 0 be used, resulting in exactly the same processing as
pol_flg
. Specifying TMO_FEVR = -1
to twai_flg
for
tmout
indicates that an infinite timeout value be used, resulting in
exactly the same processing as wai_flg
.
Multiprocessing is not supported. Thus none of the "EN_
" status
codes will be returned.
Pol_flg
and wai_flg
represent the same processing as
specifying certain values (TMO_POL
or TMO_FEVR
) to
twai_flg
for tmout. As such, only twai_flg
is implemented
in the kernel; pol_flg
and wai_flg
should be implemented as macros
which call twai_flg
.
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2003 OAR Corporation