Everything

ref_flg

iref_flg

Outline
Reference eventflag state.
C format
 ER      ref_flg (ID flgid, T_RFLG *pk_rflg);
 ER      iref_flg (ID flgid, T_RFLG *pk_rflg);
Parameter(s)
I/O
Parameter
Description
I
 ID      flgid;
ID number of the eventflag to be referenced.
O
 T_RFLG  *pk_rflg;
Pointer to the packet returning the eventflag state.

[Eventflag state packet: T_RFLG]
 typedef struct  t_rflg {
     ID      wtskid;         /*Existence of waiting task*/
     FLGPTN  flgptn;         /*Current bit pattern*/
     ATR     flgatr;         /*Attribute*/
 } T_RFLG;

Explanation
Stores eventflag state packet (ID number of the task at the head of the wait queue, current bit pattern, etc.) of the eventflag specified by parameter flgid in the area specified by parameter pk_rflg.
Note For details about the eventflag state packet, refer to "15.2.4 Eventflag state packet".
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- flgid < 0x0
- flgid > Maximum ID number
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
E_NOEXS
-42
Non-existent object.
- Specified eventflag is not registered.