---
name: "interrupt.h"
section: "3avr"
platform: "linux"
package: "avr-libc"
version: "1:2.2.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/interrupt.h"
---

# interrupt.h(3avr)

## NAME

interrupt.h

## SYNOPSIS

### Macros

**Global manipulation of the interrupt flag**\
 The global interrupt flag is maintained in the I bit of the status register (SREG).

Handling interrupts frequently requires attention regarding atomic access to objects that could be altered by code running within an interrupt context, see \<**util/atomic.h**\>.

Frequently, interrupts are being disabled for periods of time in order to perform certain operations without being disturbed; see **Problems with reordering code** for things to be taken into account with respect to compiler optimizations.

\#define **sei**()   \_\_asm\_\_ \_\_volatile\_\_ ('sei' ::: 'memory')\
 \#define **cli**()   \_\_asm\_\_ \_\_volatile\_\_ ('cli' ::: 'memory')\

**Macros for writing interrupt handler functions**\

\#define **ISR**(vector,  attributes)\
 \#define **SIGNAL**(vector)\
 \#define **EMPTY\_INTERRUPT**(vector)\
 \#define **ISR\_ALIAS**(vector,  target\_vector)\
 \#define **reti**()   \_\_asm\_\_ \_\_volatile\_\_ ('reti' ::: 'memory')\
 \#define **BADISR\_vect**\

**ISR attributes**\

\#define **ISR\_BLOCK**\
 \#define **ISR\_NOBLOCK**\
 \#define **ISR\_NAKED**\
 \#define **ISR\_FLATTEN**\
 \#define **ISR\_NOICF**\
 \#define **ISR\_NOGCCISR**\
 \#define **ISR\_ALIASOF**(target\_vector)\

## Author

Generated automatically by Doxygen for AVR-LibC from the source code.
