- 98 -
dly_tsk Delay
task
[
[
[
[
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 = dly_tsk(RELTIM dlytim);
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
RELTIM dlytim
Delay
time
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) or error code
[
[
[
[
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
dly_tsk RELTIM
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
RELTIM Delay
time
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
R6R4 Delay
time
[
[
[
[
E
E
r
r
r
r
o
o
r
r
c
c
o
o
d
d
e
e
]
]
]
]
E_RLWAI
Forced release from waiting
[
[
[
[
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
]
]
]
]
This service call temporarily stops execution of the issuing task itself for a duration of time specified by dlytim to place the
task from RUNNING state into WAITING state. In this case, the task is released from the WAITING state at the first time
tick after the time specified by dlytim has elapsed. Therefore, if specified dlytim = 0, the task is placed into WAITING state
briefly and then released from the WAITING state at the first time tick.
The task placed into WAITING state by invocation of this service call is released from the WAITING state in the following
cases. Note that when released from WAITING state, the task that issued the service call is removed from the timeout
waiting queue and linked to a ready queue.
When the first time tick occurred after dlytim elapsed
The error code returned in this case is E_OK.
When the rel_wai or irel_wai service call is issued before dlytim elapses
The error code returned in this case is E_RLWAI.
Note that even when the wup_tsk or iwup_tsk service call is issued during the delay time, the task is not released from
WAITING state.
The delay time dlytim is expressed in ms units. Therefore, if specified as dly_tsk(50);, the issuing task is placed from
RUNNING state into a delayed wait state for a period of 50 ms.
The values specified for dlytim must be within (0x7FFFFFFF- time tick value). If any value exceeding this limit is speci-
fied, the service call may not operate correctly.
This service call can be issued only from task context. It cannot be issued from non-task context.