Chapter 3 Introduction to MR308
- 29 -
3.4.3 CPU Locked/Unlocked States
The system assumes either a CPU locked state or a CPU unlocked state. In a CPU locked state, all external
interrupts are disabled against acceptance, and task scheduling is not performed either.
The system can be placed into a CPU locked state or a CPU unlocked state by the loc_cpu(iloc_cpu) or
unl_cpu(iunl_cpu) service call, respectively. Whether the system is in a CPU locked state can be known by the
sns_loc service call.
The service calls that can be issued from a CPU locked state are limited to those that are listed in Table 3-2.28
Table 3-2 Invocable Service Calls in a CPU Locked State
loc_cpu iloc_cpu unl_cpu iunl_cpu
ext_tsk exd_tsk sns_tex sns_ctx
sns_loc sns_dsp sns_dpn
3.4.4 Dispatch Disabled and CPU Locked States
In µITRON 4.0 Specification, the dispatch disabled and the CPU locked states are clearly discriminated.
Therefore, if the unl_cpu service call is issued in a dispatch disabled state, the dispatch disabled state remains
intact and no task scheduling is performed. State transitions are summarized in Table 3-3.
Table 3-3 CPU Locked and Dispatch Disabled State Transitions Relating to dis_dsp and loc_cpu
Content of state
State
number CPU locked
state
Dispatch disabled
state
dis_dsp
executed
ena_dsp
executed
loc_cpu
executed
unl_cpu
executed
1 O X X X => 1 => 3
2 O O X X => 2 => 4
3 X X => 4 => 3 => 1 => 3
4 X O => 4 => 3 => 2 => 4
28 MR308 does not return an error even when an uninvocable service call is issued from a CPU locked state, in which case, however, its
operation cannot be guaranteed.