irq_threads.h File Reference

IRQ threads API. More...

#include "globals.h"

Go to the source code of this file.

Functions

int attach_irqs (void)
 Initialize the local irq acceptor threads.
void check_auto_consume (int irq, client_chain *c)
 Checks if the given client is a candidate for auto-consuming an irq.
void irq_handler (int num)
 Handler function for one irq.


Detailed Description

IRQ threads API.

Date:
2007-04-27
Author:
Jork Loeser <jork.loeser@inf.tu-dresden.de>

Christian Helmuth <ch12@os.inf.tu-dresden.de>

Definition in file irq_threads.h.


Function Documentation

int attach_irqs ( void   ) 

Initialize the local irq acceptor threads.

This function will attach to all irqs possible and initialize the corresponding structures. At the standard-pc-x86 architecture, we have irqs 0 to 15. Try to attach to all of them. This is done by creating 16 threads, one per irq. Threads start at lthread+1.

create_threads_sync() is external to allow overloading in other pkgs.

Definition at line 519 of file irq_threads.c.

void check_auto_consume ( int  irq,
client_chain c 
)

Checks if the given client is a candidate for auto-consuming an irq.

Auto-consuming is possible, if:

  • the client is marked as in service (got a notification)
  • the clients's occurence-number matches that of the IRQ
  • the IRQ is in service
  • this client was the last (i.e., the number if waiting clients = 1)

Maybe some of the conditions follow from others.

Precondition:
The irq-mutex must be hold outside.

Definition at line 201 of file irq_threads.c.

void irq_handler ( int  num  ) 

Handler function for one irq.

After calling attach_irq(), return an IPC to the management thread and wait for incoming IRQs.

Definition at line 410 of file irq_threads.c.


Generated on Wed Apr 11 06:38:07 2012 for Omega0 DROPS Interrupt Service by  doxygen 1.5.6