splhi, spllo, splx, islo – enable and disable interrupts
void splx(int x)
These primitives enable and disable maskable interrupts on the current
Generally, device drivers should use
or the functions in
to control interaction between processes and interrupt handlers.
Those routines (but not these) provide correct synchronisation on multiprocessors.
enables interrupts and returns a flag representing the previous interrupt enable state.
It must not normally be called from interrupt level.
disables all maskable interrupts and returns the previous interrupt enable state.
The period during which interrupts are disabled had best be short,
or real-time applications will suffer.
restores the interrupt enable state to
which must be a value returned
by a previous call to
returns true (non-zero) if interrupts are currently enabled, and 0 otherwise.