Interruptible Code Generation
7-7
Interrupts
7.4.2
Level 1 – Specified Code Interruptible at All Times
At this level, the compiler employs single assignment everywhere and never
produces a loop of less than 6 cycles. The command line option –mi1 can be
used for an entire module and the following pragma can be used to force this
level on a particular function:
#pragma FUNC_INTERRUPT_THRESHOLD(func, 1);
7.4.3
Level 2 – Specified Code Interruptible Within Threshold Cycles
The compiler will disable interrupts around loops if the specified threshold
number is not exceeded. In other words, the user can specify a threshold, or
maximum interrupt delay, that allows the compiler to use multiple assignment
in loops that do not exceed this threshold. The code outside of loops can have
interrupts disabled and also use multiple assignment as long as the threshold
of uninterruptible cycles is not exceeded. If the compiler cannot determine the
loop count of a loop, then it assumes the threshold is exceeded and will gener-
ate an interruptible loop.
The command line option –mi (threshold) can be used for an entire module and
the following pragma can be used to specify a threshold for a particular func-
tion.
#pragma FUNC_INTERRUPT_THRESHOLD(func, threshold);