chg_ims

ichg_ims

Outline

Change interrupt mask.

C format

 ER      chg_ims (IMASK imask);
 ER      ichg_ims (IMASK imask);
Parameter(s)

I/O

Parameter

Description

I

 IMASK  imask;
Interrupt mask desired.



Explanation

These service calls change PSW.IPL to the value specified by imask. Ranges of the value that can be specified for imask are from 0 to 15.

In the chg_ims, the system shifts to the dispatching disabled state when other than 0 is specified for imask, (it is equivalent to dis_dsp.) and shifts to the dispatching enabled state when 0 is specified for imask (it is equivalent to ena_dsp.).

On the other hand, the ichg_ims does not change the dispatching disabled / enabled state.

The service calls that can be issued while PSW.IPL is larger than the Kernel interrupt mask level (system_IPL) are limited to the one listed below.

Service Call that can be issued

Function

Change interrupt mask.

Reference interrupt mask

System down

Start RI600V4.



Note 1 In the non-task, the interrupt mask must not lower PSW.IPL more than it starts.

Note 2 The dispatching disabled state changed by issuing the chg_ims must be cancelled before the task that issued this service call moves to the DORMANT state.

Note 3 If a service call (such as wai_sem, wai_flg) that may move the status of the invoking task is issued while the dispatching disabled state, that service call returns E_CTX regardless of whether the required condition is immediately satisfied.

Note 4 The RI600V4 realizes the TIME MANAGEMENT FUNCTIONS by using base clock timer interrupts that occurs 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 Do not issue ena_dsp while a task changes PSW.IPL to other than 0 by using chg_ims. If issuing ena_dsp, the system moves to the dispatching enabled state. If task dispatching occurs, PSW is changed for the dispatched task. Therefore PSW.IPL may be lowered without intending it

Return value

Macro

Value

Description

E_OK

0

Normal completion.

E_PAR

-17

Parameter error.

- imask > 15

E_CTX

-25

Context error.

- This service call was issued in the CPU locked state.

- The ichg_ims was issued from task.

- The chg_ims was issued from non-task.