Everything

loc_cpu

iloc_cpu

Outline
Lock the CPU.
C format
 ER      loc_cpu ( void );
 
 ER      iloc_cpu ( void );

Assembly format
 CALL    !!_loc_cpu
 
 CALL    !!_iloc_cpu

Parameter(s)
None.
Explanation
These service calls change the system status type to the CPU locked state.
As a result, maskable interrupt acknowledgment processing is prohibited during the interval from this service call is issued until unl_cpu or iunl_cpu is issued, and service call issuance is also restricted.
If a maskable interrupt is created during the interval from this service call is issued until unl_cpu or iunl_cpu is issued, the RI78V4 delays transition to the relevant interrupt processing (interrupt handler) until either unl_cpu or iunl_cpu is issued.
The service calls that can be issued in the CPU locked state are limited to the one listed below.
Service Call
Function
Lock the CPU.
Unlock the CPU.
Reference contexts.
Reference CPU state.
Reference dispatching state.
Reference dispatch pending state.

Note 1 The CPU locked state changed by issuing this service call must be cancelled before the processing program that issued this service call ends.
Note 2 This service call does not perform queuing of lock requests. If the system is in the CPU locked state, therefore, no processing is performed but it is not handled as an error.
Note 3 The RI78V4 implements disabling of maskable interrupt acknowledgment bu manipulating the interrupt mask flag register (MKxx) and the in-service priority flag (ISPx) of the program status word (PSW). Therefore, manipulating of these registers from the processing program is prohibited from when this service call is issued until unl_cpu or iunl_cpu is issued.
Return value
Macro
Value
Description
E_OK
0
Normal completion.