interrupt.c File Reference

Go to the source code of this file.

Classes

struct  intloop_params

Defines

#define DEBUG_INTERRUPTS   0
#define MAX_INTERRUPTS   32
#define BLOCK_IRQ   0

Functions

static void ddekit_irq_exit_fn (l4thread_t thread, void *data)
 L4THREAD_EXIT_FN_STATIC (exit_fn, ddekit_irq_exit_fn)
static void intloop (void *arg)
 Interrupt service loop.
ddekit_thread_tddekit_interrupt_attach (int irq, int shared, void(*thread_init)(void *), void(*handler)(void *), void *priv)
 Attach to hardware interrupt.
void ddekit_interrupt_detach (int irq)
 Detach from interrupt by disabling it and then shutting down the IRQ thread.
void ddekit_interrupt_disable (int irq)
 Block interrupt.
void ddekit_interrupt_enable (int irq)
 Enable interrupt.

Variables

struct {
   int   handle_irq
   ddekit_sem_t *   irqsem
   ddekit_thread_t *   irq_thread
   omega0_irqdesc_t   irq_desc
ddekit_irq_ctrl [MAX_INTERRUPTS]


Define Documentation

#define BLOCK_IRQ   0

Definition at line 27 of file interrupt.c.

#define DEBUG_INTERRUPTS   0

Definition at line 23 of file interrupt.c.

#define MAX_INTERRUPTS   32

Definition at line 25 of file interrupt.c.


Function Documentation

ddekit_thread_t* ddekit_interrupt_attach ( int  irq,
int  shared,
void(*)(void *)  thread_init,
void(*)(void *)  handler,
void *  priv 
)

Attach to hardware interrupt.

Parameters:
irq IRQ number to attach to
shared set to 1 if interrupt sharing is supported; set to 0 otherwise
thread_init called just after DDEKit internal init and before any other function
handler IRQ handler for interrupt irq
priv private token (argument for thread_init and handler)
Returns:
pointer to interrupt thread created

Definition at line 155 of file interrupt.c.

void ddekit_interrupt_detach ( int  irq  ) 

Detach from interrupt by disabling it and then shutting down the IRQ thread.

Detach from a previously attached interrupt.

Definition at line 205 of file interrupt.c.

void ddekit_interrupt_disable ( int  irq  ) 

Block interrupt.

Parameters:
irq IRQ number to block

Definition at line 212 of file interrupt.c.

void ddekit_interrupt_enable ( int  irq  ) 

Enable interrupt.

Parameters:
irq IRQ number to block

Definition at line 222 of file interrupt.c.

static void ddekit_irq_exit_fn ( l4thread_t  thread,
void *  data 
) [static]

Definition at line 53 of file interrupt.c.

static void intloop ( void *  arg  )  [static]

Interrupt service loop.

Definition at line 68 of file interrupt.c.

L4THREAD_EXIT_FN_STATIC ( exit_fn  ,
ddekit_irq_exit_fn   
)


Variable Documentation

struct { ... } ddekit_irq_ctrl[MAX_INTERRUPTS] [static]

Definition at line 46 of file interrupt.c.

omega0_irqdesc_t irq_desc

Definition at line 49 of file interrupt.c.

Definition at line 48 of file interrupt.c.

Definition at line 47 of file interrupt.c.


Generated on Wed Apr 11 06:39:15 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6