- 103 -
wai_sem Acquire semaphore resource pol_sem Acquire semaphore resource (polling) ipol_sem Acquire semaphore resource (polling, handler only) twai_sem Acquire semaphore resource(with timeout)
[
[[
[
C
C
L
La
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
ER ercd = wai_sem( ID semid );
ER ercd = pol_sem( ID semid );
ER ercd = ipol_sem( ID semid );
ER ercd = twai_sem( ID semid, TMO tmout );
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
ID semid Semaphore ID number to be acquired
TMO tmout Timeout value (for twai_sem)
z
z
R
Re
et
tu
ur
rn
n
P
Pa
ar
ra
am
me
et
te
er
rs
s
ER ercd Terminated normally (E_OK) or error code
[
[[
[
A
As
ss
se
em
mb
bl
ly
y
l
la
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
.include mr100.inc
wai_sem SEMID
pol_sem SEMID
ipol_sem SEMID
twai_sem SEMID,TMO
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
SEMID Semaphore ID number to be acquired
TMO Timeout value(twai_sem)
z
z
R
Re
eg
gi
is
st
te
er
r
c
co
on
nt
te
en
nt
ts
s
a
af
ft
te
er
r
s
se
er
rv
vi
ic
ce
e
c
ca
al
ll
l
i
is
s
i
is
ss
su
ue
ed
d
wai_sem,pol_sem,ipol_sem
Register name Content after service call is issued
R0 Error code
R2 Semaphore ID number to be acquired
twai_sem
Register
name Content after service call is issued
R0 Error code
R2 Semaphore ID number to be acquired
R6R4 Timeout value
[
[[
[
E
Er
rr
ro
or
r
c
co
od
de
e
]
]]
]
E_RLWAI Forced release from waiting
E_TMOUT Polling failure or timeout