Interface TEST_SPLX

Preprocessor macro expanding to a command

SpaceUser/kernel
ContextSync/async
May blockNo
SPLAny
Dynamic memoryNo

#include <SPAD/AC.H>

TEST_SPLX(splxlow, splxhigh)

Description

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.

Arguments

Implementation note

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.

See also

RAISE_SPLX, LOWER_SPLX SPLX_BUSY TEST_SPL SPL_X