- 97 -
[
[[
[
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 task1()
{ :
if( rsm_tsk( ID_main ) != E_OK )
printf(“Can’t resume main()\n”);
:
:
if(frsm_tsk( ID_task2 ) != E_OK )
printf(“Can’t forced resume task2()\n”);
:
}
<<Example statement in assembly language>>
.include mr100.inc
.GLB task
task: :
PUSH.W R2
rsm_tsk #ID_TASK2
:
PUSH.W R2
frsm_tsk #ID_TASK1
: