loc_cpu

iloc_cpu

Outline

Lock the CPU.

C format

 ER      loc_cpu (void);
 ER      iloc_cpu (void);
Parameter(s)

None.

Explanation

These service calls change the system status type to the CPU locked state.

As a result, "EI level maskable interrupt acceptance" and "service call issue (except for some service calls)" are prohibited during the interval from when this service call is issued until unl_cpu or iunl_cpu is issued.

Service Call

Function

Lock the CPU.

Unlock the CPU.

Reference CPU state.

Reference dispatching state.

Reference contexts.

Reference dispatch pending state.



If an EI level maskable interrupt is created during this period, the RI850V4 delays transition to the relevant interrupt processing (interrupt handler) until either unl_cpu or iunl_cpu is issued.

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 This service call manipulates PMn bits in the priority mask register (PMR) to disable acceptance of EI level maskable interrupts.
The PMn bits to be manipulated correspond to the interrupt priority range defined as the Maximum interrupt priority: maxintpri during configuration.
This service call does not manipulate the ID bit in the program status word (PSW).



Note 4 The RI850V4 realizes the TIME MANAGEMENT FUNCTIONS by using base clock timer interrupts that occur at constant intervals. If acknowledgment of the relevant base clock timer interrupt is disabled by issuing this service call, the TIME MANAGEMENT FUNCTIONS may no longer operate normally.

Note 5 If this service call or a service call other than sns_xxx is issued from when this service call is issued until unl_cpu or iunl_cpu is issued, the RI850V4 returns E_CTX.

Return value

Macro

Value

Description

E_OK

0

Normal completion.