Everything

set_flg

iset_flg

Outline
Set eventflag.
C format
 ER      set_flg ( ID flgid, FLGPTN setptn );
 
 ER      iset_flg ( ID flgid, FLGPTN setptn );

Assembly format
 MOVW    BC, #setptn
 MOV     A,  #flgid
 CALL    !!_set_flg
 
 MOVW    BC, #setptn
 MOV     A,  #flgid
 CALL    !!_iset_flg

Parameter(s)
I/O
Parameter
Description
I
 ID      flgid;
ID number of the eventflag to be set.
I
 FLGPTN  setptn;
Bit pattern to set (16 bits).

Explanation
These service calls set the result of ORing the bit pattern of the eventflag specified by parameter flgid and the bit pattern specified by parameter setptn as the bit pattern of the target eventflag.
If the required condition of the task queued to the target eventflag wait queue is satisfied when this service call is issued, the relevant task is unlinked from the wait queue at the same time as bit pattern setting processing.
As a result, the relevant task is moved from the WAITING state (waiting state for an eventflag) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note 1 If the task linked in the wait queue is moved to the READY state after this service call is issued, this service call also re-queues the task at the end of the ready queue corresponding to the priority of the task.
Note 2 If the bit pattern set to the target eventflag is B'1100 and the bit pattern specified by parameter setptn is B'1010 when this service call is issued, the bit pattern of the target eventflag is set to B'1110.
Return value
Macro
Value
Description
E_OK
0
Normal completion.