- 87 -
[
[[
[
E
Ex
xa
am
mp
pl
le
e
p
pr
ro
og
gr
ra
am
m
s
st
ta
at
te
em
me
en
nt
t
]
]]
]
<<Example statement in C language>>
#include <itron.h>
#include <kernel.h>
#include “kernel_id.h”
void task()
{
:
if( slp_tsk() != E_OK )
error(“Forced wakeup\n”);
:
if( tslp_tsk( 10 ) == E_TMOUT )
error(“time out\n”);
:
}
<<Example statement in assembly language>>
.include mr100.inc
.GLB task
task: :
slp_tsk
:
PUSHM R6R4
tslp_tsk #TMO_FEVR
:
PUSHM R6R4
tslp_tsk #100
: