Preprocessor macro expanding to a command
Space | User/kernel |
Context | Sync/async |
May block | No |
SPL | Any |
Dynamic memory | No |
#include <SPAD/AC.H>
TEST_SPLX(splxlow, splxhigh)
splxhigh must be equal to current SPL. This is equivalent to LOWER_SPLX(splxlow); RAISE_SPLX(splxhigh)
— i.e. it tests if there are some events pending above splxlow, performs the events and raises SPL back. This macro is slightly faster than the above code sequence, because it doesn't lower and raise SPL if there are no events.
SPL_X
or by other means (reading KERNEL$SPL
). Must be lower or equal than current SPL. SPL_X
or by other means (reading KERNEL$SPL
). Must be equal to current SPL.If the arguments are constant, compile-time check for correctness is made. When __DEBUG is >= 2, the macro performs a run-time check if the current SPL is equal to splxhigh and if splxlow is lower.