Preprocessor macro expanding to an expression
Space | User/kernel |
Context | Sync/async/rt-irq |
May block | No |
SPL | Any |
Dynamic memory | No |
#include <SPAD/AC.H>
if (SPLX_BELOW(splx1, splx2)) ...
This macro compares two SPL levels specified in internal SPL format (as returned by SPL_X
). It returns non-zero if splx1 is lower than SPL2. Because the internal format is not specified (it's architecture-specific), they can't be compared with operators < or >.
SPL_X
or by other means (reading KERNEL$SPL
). SPL_X
or by other means (reading KERNEL$SPL
).Returns non-zero if splx1 is below splx2.
If one of the arguments is constant, the macro performs a compile-time check for correctness.
if (SPLX_BELOW(SPL_X(SPL_DEV), KERNEL$SPL))
  KERNEL$SUICIDE("FUNCTION CALLED AT BAD SPL: %08X", KERNEL$SPL);
RAISE_SPL(SPL_DEV);