Interface SPL_X

Preprocessor macro expanding to an expression

SpaceUser/kernel
ContextSync/async/rt-irq
May blockNo
SPLAny
Dynamic memoryNo

#include <SPAD/AC.H>

x = SPL_X(spl);

Description

This macro converts portable SPL number (in range 0 – 30) to internal architecture-specific SPL representation.

Arguments

Returns

This macro returns internal SPL definition that can be further passed to SPL functions and macros having X suffix. The internal SPL definition fits into int type.

Implementation note

The macro tests at compile-time if the argument is valid.

On IA-32, the this macro is defined as -1 << (spl + 1). On other architectures, the internal format may be defined differently, accoring to the availability and speed of bit-manipulation functions.

See also

RAISE_SPLX, LOWER_SPLX, KERNEL$SPL