# arch/avr32/softirq.c File Reference

Architecture-specific soft interrupt implementation. More...

`#include <compiler.h>`
`#include <interrupt.h>`
`#include <softirq.h>`
`#include <util.h>`
`#include <app/softirq.h>`

Include dependency graph for softirq.c:

Go to the source code of this file.

## 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.
## Variables
unsigned long | softirq_priv_status
| Bitmask indicating the active status of each soft interrupt.

## Detailed Description

Architecture-specific soft interrupt implementation.

- Compiler: IAR EWAVR32 and GNU GCC for AVR32
- Supported devices: All AVR32 devices
- AppNote:

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

Definition in file softirq.c.

## Function Documentation

void softirq_enable | ( | void |  | ) |

Enable softirq processing.

This function will also process any softirqs raised while softirq processing was disabled.

Precondition:
  Interrupts are not masked

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().

Here is the call graph for this function:

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.

Precondition:
  Interrupts are disabled

  All interrupt levels are enabled

  At least one softirq is pending

Postcondition:
  Interrupts are disabled

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().

Here is the call graph for this function:

void softirq_set_handler | ( | unsigned int | id,
|  | softirq_handler_t | handler,
|  | void * | data |
| ) |  |  |

Install a soft interrupt handler.

Parameters:

  | 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().

## Variable Documentation

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().