-
pol_flg
ipol_flg
-
Wait for eventflag (polling).
ER pol_flg (ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn);
ER ipol_flg (ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn);
|
|
|
|
ID flgid;
|
ID number of the eventflag to wait for.
|
|
FLGPTN waiptn;
|
|
|
MODE wfmode;
|
TWF_ANDW: AND waiting condition.
TWF_ORW: OR waiting condition.
|
|
FLGPTN *p_flgptn;
|
Bit pattern causing a task to be released from waiting.
|
This service call checks whether the bit pattern specified by parameter
waiptn and the bit pattern that satisfies the required condition specified by parameter
wfmode are set to the eventflag specified by parameter
flgid.
If the bit pattern that satisfies the required condition has been set to the target eventflag, the bit pattern of the target eventflag is stored in the area specified by parameter
p_flgptn.
If the bit pattern of the target eventflag does not satisfy the required condition when this service call is issued, "E_TMOUT" is returned.
The following shows the specification format of required condition
wfmode.
-
wfmode = TWF_ANDW
Checks whether all of the bits to which 1 is set by parameter
waiptn are set as the target eventflag.
-
wfmode = TWF_ORW
Checks which bit, among bits to which 1 is set by parameter
waiptn, is set as the target eventflag.
Note 1 With the RI850V4, whether to enable queuing of multiple tasks to the event flag wait queue is defined during configuration. If this service call is issued for the event flag (TW_WSGL attribute) to which a wait task is queued, therefore, "E_ILUSE" is returned regardless of whether the required condition is immediately satisfied.
TA_WSGL: Only one task is allowed to be in the WAITING state for the eventflag.
TA_WMUL: Multiple tasks are allowed to be in the WAITING state for the eventflag.
Note 2 The RI850V4 performs bit pattern clear processing (0x0 setting) when the required condition of the target eventflag (TA_CLR attribute) is satisfied.
Note 3 If the bit pattern of the target event flag does not satisfy the required condition when this service call is issued, the contents in the area specified by parameter
p_flgptn become undefined.
|
|
|
|
|
|
|
|
|
|
|
- flgid > Maximum ID number
|
|
|
- This service call was issued in the CPU locked state.
|
|
|
Illegal service call use.
- There is already a task waiting for an eventflag with the TA_WSGL attribute.
|
|
|
- Specified eventflag is not registered.
|
|
|
- The bit pattern of the target eventflag does not satisfy the wait condition.
|