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


Go to the source code of this file.
Typedefs | |
| typedef void(* | softirq_handler_t )(void *data) |
| Soft interrupt handler function. | |
Functions | |
| void | softirq_set_handler (unsigned int id, softirq_handler_t handler, void *data) |
| Install a soft interrupt handler. | |
| void | softirq_priv_do_pending (void) |
| Execute handlers for all pending softirqs. | |
| void | softirq_enable (void) |
| Enable softirq processing. | |
| static void | softirq_disable (void) |
| Disable softirq processing. | |
| static void | softirq_raise (unsigned int id) |
| Raise the soft interrupt id. | |
| static bool | softirq_is_enabled_flags (unsigned long flags) |
| Test if soft interrupts are enabled in flags. | |
| static bool | softirq_is_enabled (void) |
| Test if soft interrupts are enabled. | |
| static unsigned long | softirq_save (void) |
| Save the current soft interrupt sate and disable soft interrupts. | |
| static void | softirq_restore (unsigned long flags) |
| Restore saved soft interrupt state. | |
Variables | |
| unsigned long | softirq_priv_status |
| Bitmask indicating the active status of each soft interrupt. | |
Definition in file softirq.h.
| typedef void(* softirq_handler_t)(void *data) |
Soft interrupt handler function.
| data | Data pointer that was passed to softirq_set_handler(). |
| static void softirq_disable | ( | void | ) | [inline, static] |
Disable softirq processing.
No pending softirqs will be processed until softirq_enable() is called.
Definition at line 67 of file softirq.h.
References avr32_set_sr_bit, barrier, and SYSREG_SR_T_BIT.
Referenced by led_blink_start(), led_blink_stop(), and softirq_save().
| void softirq_enable | ( | void | ) |
Enable softirq processing.
This function will also process any softirqs raised while softirq processing was disabled.
Definition at line 129 of file softirq.c.
References assert, avr32_clear_sr_bit, cpu_irq_disable, cpu_irq_enable, cpu_irq_is_enabled, softirq_priv_do_pending(), softirq_priv_status, and SYSREG_SR_T_BIT.
Referenced by led_blink_start(), led_blink_stop(), and softirq_restore().

| static bool softirq_is_enabled | ( | void | ) | [inline, static] |
Test if soft interrupts are enabled.
| true | If soft interrups are enabled | |
| false | If soft interrupts are disabled |
Definition at line 104 of file softirq.h.
References softirq_is_enabled_flags().

| static bool softirq_is_enabled_flags | ( | unsigned long | flags | ) | [inline, static] |
Test if soft interrupts are enabled in flags.
| flags | Saved soft interrupt state |
| true | If flags indicates soft interrups are enabled | |
| false | If flags indicates soft interrupts are disabled |
Definition at line 94 of file softirq.h.
Referenced by softirq_is_enabled(), and softirq_restore().
| void softirq_priv_do_pending | ( | void | ) |
Execute handlers for all pending softirqs.
For internal use only.
This function is called with interrupts disabled and returns with interrupts disabled, but interrupts are enabled most of the time while the function is running.
All interrupt levels are enabled
At least one softirq is pending
Definition at line 94 of file softirq.c.
References __ffs(), ARRAY_LEN, assert, clear_bit(), cpu_irq_disable, cpu_irq_enable, cpu_irq_is_enabled, and softirq_priv_status.
Referenced by softirq_enable().

| static void softirq_raise | ( | unsigned int | id | ) | [inline, static] |
Raise the soft interrupt id.
Calling this function will flag soft interrupt id as active, which will cause the associated handler to be run at the first opportunity.
Note that if this function is called from a non-interrupt context with softirqs enabled, it is undefined when the handler will actually be run.
Definition at line 83 of file softirq.h.
References atomic_set_bit(), and softirq_priv_status.
Referenced by timer_irq_handler(), and usbb_udc_interrupt().

| static void softirq_restore | ( | unsigned long | flags | ) | [inline, static] |
Restore saved soft interrupt state.
| flags | A cookie returned by softirq_save() |
Definition at line 130 of file softirq.h.
References softirq_enable(), and softirq_is_enabled_flags().

| static unsigned long softirq_save | ( | void | ) | [inline, static] |
Save the current soft interrupt sate and disable soft interrupts.
Definition at line 116 of file softirq.h.
References softirq_disable().

| void softirq_set_handler | ( | unsigned int | id, | |
| softirq_handler_t | handler, | |||
| void * | data | |||
| ) |
Install a soft interrupt handler.
| handler | Function to be called when soft interrupt is active | |
| data | Arbitrary data to be passed to handler |
Definition at line 67 of file softirq.c.
References ARRAY_LEN, assert, build_assert, and softirq_priv_status.
Referenced by sdmmc_mcihost_init(), timer_init(), and usbb_udc_init().
| unsigned long softirq_priv_status |
Bitmask indicating the active status of each soft interrupt.
For internal use only.
Definition at line 57 of file softirq.c.
Referenced by softirq_enable(), softirq_priv_do_pending(), softirq_raise(), and softirq_set_handler().
1.5.8