arch/avr32/include/arch/interrupt.h File Reference

AVR32-specific interrupt masking/unmasking. More...

#include <compiler.h>
#include <arch/sysreg.h>
#include <stdbool.h>

Include dependency graph for interrupt.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define cpu_irq_is_enabled_flags(flags)   (!((flags) & SYSREG_SR_GM))
 Test if interrupts are enabled in flags.
#define cpu_irq_is_enabled()   cpu_irq_is_enabled_flags(sysreg_read(SR))
 Test if interrupts are enabled.

Functions

static __always_inline
unsigned long 
cpu_irq_save (void)
 Save the current interrupt state and disable interrupts.
static __always_inline void cpu_irq_restore (unsigned long flags)
 Restore saved interrupt state.
static bool cpu_is_in_hardirq_handler (void)
 Test if the CPU is currently executing an interrupt handler.


Detailed Description

AVR32-specific interrupt masking/unmasking.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file interrupt.h.


Define Documentation

 
#define cpu_irq_is_enabled (  )     cpu_irq_is_enabled_flags(sysreg_read(SR))

Test if interrupts are enabled.

Return values:
true If interrups are enabled
false If interrupts are disabled

Definition at line 87 of file interrupt.h.

Referenced by softirq_enable(), softirq_priv_do_pending(), udc_ep_submit_in_req(), and udc_ep_submit_out_req().

#define cpu_irq_is_enabled_flags ( flags   )     (!((flags) & SYSREG_SR_GM))

Test if interrupts are enabled in flags.

Parameters:
flags Saved interrupt state
Return values:
true If flags indicates interrups are enabled
false If flags indicates interrupts are disabled

Definition at line 79 of file interrupt.h.


Function Documentation

static __always_inline void cpu_irq_restore ( unsigned long  flags  )  [static]

static __always_inline unsigned long cpu_irq_save ( void   )  [static]

static bool cpu_is_in_hardirq_handler ( void   )  [inline, static]

Test if the CPU is currently executing an interrupt handler.

Return values:
true The CPU is in an interrupt handler
false The CPU is not in an interrupt handler

Definition at line 95 of file interrupt.h.


Generated on Tue Sep 15 10:17:57 2009 for libavr32 by  doxygen 1.5.8