00001 /* 00002 * \brief Hardware-interrupt subsystem 00003 * \author Thomas Friebel <tf13@os.inf.tu-dresden.de> 00004 * \author Christian Helmuth <ch12@os.inf.tu-dresden.de> 00005 * \date 2007-01-26 00006 * 00007 * DDEKit supports registration of one handler function per interrupt. If any 00008 * specific DDE implementation needs to register more than one handler, 00009 * multiplexing has to be implemented there! 00010 */ 00011 00012 #ifndef _ddekit_interrupt_h 00013 #define _ddekit_interrupt_h 00014 00015 #include <l4/dde/ddekit/thread.h> 00016 00017 #define DDEKIT_IRQ_PRIO 0x11 00018 00019 /** 00020 * Attach to hardware interrupt 00021 * 00022 * \param irq IRQ number to attach to 00023 * \param shared set to 1 if interrupt sharing is supported; set to 0 00024 * otherwise 00025 * \param thread_init called just after DDEKit internal init and before any 00026 * other function 00027 * \param handler IRQ handler for interrupt irq 00028 * \param priv private token (argument for thread_init and handler) 00029 * 00030 * \return pointer to interrupt thread created 00031 */ 00032 ddekit_thread_t *ddekit_interrupt_attach(int irq, int shared, 00033 void(*thread_init)(void *), 00034 void(*handler)(void *), void *priv); 00035 00036 /** 00037 * Detach from a previously attached interrupt. 00038 * 00039 * \param irq IRQ number 00040 */ 00041 void ddekit_interrupt_detach(int irq); 00042 00043 /** 00044 * Block interrupt. 00045 * 00046 * \param irq IRQ number to block 00047 */ 00048 void ddekit_interrupt_disable(int irq); 00049 00050 /** 00051 * Enable interrupt. 00052 * 00053 * \param irq IRQ number to block 00054 */ 00055 void ddekit_interrupt_enable(int irq); 00056 00057 #endif
1.5.6