## NAME

i_disable, i_restore - disable and restore interrupts

## SYNOPSIS

#include <sys/interrupt.h>

Status i_disable();
void i_restore( Status ps );

Both are callable from an ISR.

## DESCRIPTION

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.

## NOTES

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.

## SEE ALSO

Nano_lock() / Nano_unlock()

#### Home page (Kernel)

## < Copyright Rowebots Research Inc. and Multiprocessor Toolsmiths Inc. 1987-2018 >