- 111 -
clr_flg Clear
eventflag
iclr_flg
Clear eventflag (handler only)
[
[
[
[
C
C
L
L
a
a
n
n
g
g
u
u
a
a
g
g
e
e
A
A
P
P
I
I
]
]
]
]
ER ercd = clr_flg( ID flgid, FLGPTN clrptn );
ER ercd = iclr_flg( ID flgid, FLGPTN clrptn );
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
ID
flgid
ID number of the eventflag to be cleared
FLGPTN
clrptn
Bit pattern to be cleared
z
z
R
R
e
e
t
t
u
u
r
r
n
n
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
ER ercd Terminated
normally (E_OK)
[
[
[
[
A
A
s
s
s
s
e
e
m
m
b
b
l
l
y
y
l
l
a
a
n
n
g
g
u
u
a
a
g
g
e
e
A
A
P
P
I
I
]
]
]
]
.include mr100.inc
clr_flg FLGID,CLRPTN
iclr_flg FLGID,CLRPTN
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
FLGID
ID number of the eventflag to be cleared
CLRPTN
Bit pattern to be cleared
z
z
R
R
e
e
g
g
i
i
s
s
t
t
e
e
r
r
c
c
o
o
n
n
t
t
e
e
n
n
t
t
s
s
a
a
f
f
t
t
e
e
r
r
s
s
e
e
r
r
v
v
i
i
c
c
e
e
c
c
a
a
l
l
l
l
i
i
s
s
i
i
s
s
s
s
u
u
e
e
d
d
Register name
Content after service call is issued
R0 Error
code
R2
ID number of the eventflag to be cleared
A1
Bit pattern to be cleared
[
[
[
[
E
E
r
r
r
r
o
o
r
r
c
c
o
o
d
d
e
e
]
]
]
]
None
[
[
[
[
F
F
u
u
n
n
c
c
t
t
i
i
o
o
n
n
a
a
l
l
d
d
e
e
s
s
c
c
r
r
i
i
p
p
t
t
i
i
o
o
n
n
]
]
]
]
Of the 32-bit eventflag indicated by flgid, this service call clears the bits whose corresponding values in clrptn are 0. In
other words, the eventflag bit pattern indicated by flgid is updated by AND’ing it with clrptn. If all bits specified in clrptn
are 1, no operation will be performed for the target eventflag, in which case no errors are assumed, however.
If this service call is to be issued from task context, use clr_flg; if issued from non-task context, use iclr_flg.
35
When iclr_flg is issued from interruption generated during set_flg or iset_flg service call execution, the indivisibility of a service call is not
guaranteed. That is, if there are two or more tasks which are waiting by the same bit pattern in the waiting queue, some tasks are released
and some tasks are not released by the timing of interruption generating.