Preprocessor macro expanding to a command
Space | User/kernel |
Context | Sync/async |
May block | No |
SPL | Any |
Dynamic memory | No |
#include <SPAD/AC.H>
LOWER_SPLX(splx)
Lowers SPL to a given value. splx must be lower or equal than current SPL (KERNEL$SPL). This macro issues a proper compiler memory-barrier, so that the compiler doesn't try to reorder code around SPL-lowering instruction. After lowering the SPL, this macro calls immediatelly any ASTs or IORQs that were pending above the new SPL.
SPL_X
or by other means (reading KERNEL$SPL
). It must be lower or equal than current SPL.When __DEBUG is >= 2, the macro performs a check if current SPL is higher or equal than new SPL. It also performs a check if the argument is correct.