Renesas M3T-MR100 Network Card User Manual


 
- 172 -
loc_cpu Lock the CPU
iloc_cpu Lock the CPU (handler only)
[
[
[
[
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 = loc_cpu();
ER ercd = iloc_cpu();
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
None
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)
[
[
[
[
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
loc_cpu
iloc_cpu
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
None
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
[
[
[
[
E
E
r
r
r
r
o
o
r
r
c
c
o
o
d
d
e
e
]
]
]
]
None
[
[
[
[
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 places the system into a CPU locked state, thereby disabling interrupts and task dispatches. The features of
a CPU locked state are outlined below.
(1) No task scheduling is performed during a CPU locked state.
(2) No external interrupts are accepted unless their priority levels are higher than the kernel interrupt
mask level defined in the configurator.
(3) Only the following service calls can be invoked from a CPU locked state. If any other service calls
are invoked, operation of the service call cannot be guaranteed.
* ext_tsk
* loc_cpu, iloc_cpu
* unl_cpu, iunl_cpu
* sns_ctx
* sns_loc
* sns_dsp
* sns_dpn
The system is freed from a CPU locked state by one of the following operations.
(a) Invocation of the unl_cpu or iunl_cpu service call
(b) Invocation of the ext_tsk service call
Transitions between CPU locked and CPU unlocked states occur only when the loc_cpu, iloc_cpu, unl_cpu, iunl_cpu, or
ext_tsk service call is invoked. The system must always be in a CPU unlocked state when the interrupt handler or the time
event handler is terminated. If either handler terminates while the system is in a CPU locked state, handler operation cannot
be guaranteed. Note that the system is always in a CPU unlocked state when these handlers start.
Invoking this service call again while the system is already in a CPU locked state does not cause an error, in which case
task queuing is not performed, however.
If this service call is to be issued from task context, use loc_cpu; if issued from non-task context, use iloc_cpu.