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


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. | |
Definition in file interrupt.h.
| #define cpu_irq_is_enabled | ( | ) | cpu_irq_is_enabled_flags(sysreg_read(SR)) |
Test if interrupts are enabled.
| 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.
| flags | Saved interrupt state |
| true | If flags indicates interrups are enabled | |
| false | If flags indicates interrupts are disabled |
Definition at line 79 of file interrupt.h.
| static __always_inline void cpu_irq_restore | ( | unsigned long | flags | ) | [static] |
Restore saved interrupt state.
| flags | A cookie returned by cpu_irq_save() |
Definition at line 67 of file interrupt.h.
References avr32_write_sr, and barrier.
Referenced by console_drv_putchar(), console_drv_write(), gpio_register_irq_handler(), mem_pool_alloc(), mem_pool_free(), msc_do_read(), msc_queue_empty(), pm_priv_set_main_clock(), timer_do_pending(), udc_attach(), udc_detach(), udc_ep_clear_wedge(), udc_ep_create(), udc_ep_destroy(), udc_ep_flush(), udc_ep_set_wedge(), usbb_udc_configure_ep(), workqueue_add_item(), workqueue_add_item_safe(), and workqueue_remove_item().
| static __always_inline unsigned long cpu_irq_save | ( | void | ) | [static] |
Save the current interrupt state and disable interrupts.
Definition at line 53 of file interrupt.h.
References cpu_irq_disable.
Referenced by console_drv_putchar(), console_drv_write(), gpio_register_irq_handler(), mem_pool_alloc(), mem_pool_free(), msc_do_read(), msc_queue_empty(), pm_priv_set_main_clock(), timer_do_pending(), udc_attach(), udc_detach(), udc_ep_clear_wedge(), udc_ep_create(), udc_ep_destroy(), udc_ep_flush(), udc_ep_set_wedge(), usbb_udc_configure_ep(), workqueue_add_item(), workqueue_add_item_safe(), and workqueue_remove_item().
| static bool cpu_is_in_hardirq_handler | ( | void | ) | [inline, static] |
Test if the CPU is currently executing an interrupt handler.
| 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.
1.5.8