Skip to main content

IAR Embedded Workbench for RISC-V 3.40

preemptive

In this section:
Syntax
#pragma preemptive=addr1[,addr2,...]
Parameters

addrN

The address of an additional CSR to save in addition to the registers saved by using the __preemptive attribute. The available memory range for CSRs is 0–4095.

Description

Use this pragma directive with interrupt functions declared __preemptive to make the interrupt enter sequence save additional control and status registers (CSR) for the __preemptive interrupt function that follows.

Example
#pragma preemptive=0x102,0x104
__preemptive __interrupt void myInterruptFunction(void);
{
    ...
}
See also

__preemptive.