- 124 -
[
[[
[
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()
{
VP_INT data;
:
if( rcv_dtq( ID_dtq, &data ) != E_RLWAI )
error(“forced wakeup\n”);
:
if( prcv_dtq( ID_dtq, &data ) != E_TMOUT )
error(“Timeout\n”);
:
if( trcv_dtq( ID_dtq, &data, 10 ) != E_TMOUT )
error(“Timeout \n”);
:
}
<<Example statement in assembly language>>
.include mr100.inc
.GLB task
task: :
PUSH.W R2
PUSHM R6R4
trcv_dtq #ID_DTQ1,#TMO_POL
:
PUSH.W R2
prcv_dtq #ID_DTQ2
:
PUSH.W R2
rcv_dtq #ID_DTQ2
: