i_disable, i_restore - disable and restore interrupts
#include <sys/interrupt.h>
Both are callable from an ISR.
The primitive i_disable() disables all interrupts on the processor from which the call is made. Interrupts may be restored to their previous level by calling i_restore().
These calls properly handle nesting. If interrupts where disabled when i_disable() was called, i_restore() will return with interrupts still disabled.
The mechanism for disabling and enabling of interrupts, and the format of the ps argument is processor dependent.
i_disable() and i_restore() may be implemented as macros.