- 174 -
unl_cpu Unlock the CPU iunl_cpu Unlock the CPU (handler only)
[
[[
[
C
C
L
La
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
ER ercd = unl_cpu();
ER ercd = iunl_cpu();
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
None
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)
[
[[
[
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
unl_cpu
iunl_cpu
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
None
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
Register name Content after service call is issued
R0 Error code
[
[[
[
E
Er
rr
ro
or
r
c
co
od
de
e
]
]]
]
None
[
[[
[
F
Fu
un
nc
ct
ti
io
on
na
al
l
d
de
es
sc
cr
ri
ip
pt
ti
io
on
n
]
]]
]
This service call frees the system from a CPU locked state that was set by the loc_cpu or iloc_cpu service call. If the
unl_cpu service call is issued from a dispatching enabled state, task scheduling is performed. If the system was put into a
CPU locked state by invoking iloc_cpu within an interrupt handler, the system must always be placed out of a CPU locked
state by invoking iunl_cpu before it returns from the interrupt handler.
The CPU locked state and the dispatching disabled state are managed independently of each other. Therefore, the system
cannot be freed from a dispatching disabled state by the unl_cpu or iunl_cpu service call unless the ena_dsp service call is
used.
If this service call is to be issued from task context, use unl_cpu; if issued from non-task context, use iunl_cpu.
[
[[
[
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()
{
:
unl_cpu();
:
}
<<Example statement in assembly language>>
.include mr100.inc
.GLB task
task: :
unl_cpu
: