Changeset 6cd9aa6 in mainline for kernel/generic
- Timestamp:
- 2009-02-15T23:13:55Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 17f168e
- Parents:
- fa09449
- Location:
- kernel/generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ddi/irq.h
rfa09449 r6cd9aa6 80 80 81 81 struct irq; 82 typedef void (* irq_handler_t)(struct irq * irq, void *arg, ...);82 typedef void (* irq_handler_t)(struct irq *); 83 83 84 84 /** Type for function used to clear the interrupt. */ 85 typedef void (* cir_t)(void * arg, inr_t inr);85 typedef void (* cir_t)(void *, inr_t); 86 86 87 87 /** IPC notification config structure. … … 140 140 irq_trigger_t trigger; 141 141 /** Claim ownership of the IRQ. */ 142 irq_ownership_t (* claim)(void );142 irq_ownership_t (* claim)(void *); 143 143 /** Handler for this IRQ and device. */ 144 144 irq_handler_t handler; 145 /** Argument for the handler. */146 void * arg;145 /** Instance argument for the handler and the claim function. */ 146 void *instance; 147 147 148 148 /** Clear interrupt routine. */ … … 155 155 } irq_t; 156 156 157 extern void irq_init(count_t inrs, count_t chains);158 extern void irq_initialize(irq_t * irq);159 extern void irq_register(irq_t * irq);160 extern irq_t *irq_dispatch_and_lock(inr_t inr);161 extern irq_t *irq_find_and_lock(inr_t inr, devno_t devno);157 extern void irq_init(count_t, count_t); 158 extern void irq_initialize(irq_t *); 159 extern void irq_register(irq_t *); 160 extern irq_t *irq_dispatch_and_lock(inr_t); 161 extern irq_t *irq_find_and_lock(inr_t, devno_t); 162 162 163 163 #endif -
kernel/generic/src/console/console.c
rfa09449 r6cd9aa6 102 102 * @return Always returns IRQ_DECLINE. 103 103 */ 104 static irq_ownership_t klog_claim(void )104 static irq_ownership_t klog_claim(void *instance) 105 105 { 106 106 return IRQ_DECLINE; -
kernel/generic/src/console/kconsole.c
rfa09449 r6cd9aa6 104 104 * 105 105 */ 106 static irq_ownership_t kconsole_claim(void )106 static irq_ownership_t kconsole_claim(void *instance) 107 107 { 108 108 return IRQ_DECLINE; -
kernel/generic/src/ddi/irq.c
rfa09449 r6cd9aa6 40 40 * This code is designed to support: 41 41 * - multiple devices sharing single IRQ 42 * - multiple IRQs per signle device 42 * - multiple IRQs per single device 43 * - multiple instances of the same device 43 44 * 44 45 * … … 145 146 irq->claim = NULL; 146 147 irq->handler = NULL; 147 irq-> arg= NULL;148 irq->instance = NULL; 148 149 irq->cir = NULL; 149 150 irq->cir_arg = NULL; … … 307 308 if (devno == -1) { 308 309 /* Invoked by irq_dispatch_and_lock(). */ 309 rv = ((irq->inr == inr) && (irq->claim() == IRQ_ACCEPT)); 310 rv = ((irq->inr == inr) && 311 (irq->claim(irq->instance) == IRQ_ACCEPT)); 310 312 } else { 311 313 /* Invoked by irq_find_and_lock(). */ … … 366 368 if (devno == -1) { 367 369 /* Invoked by irq_dispatch_and_lock() */ 368 rv = (irq->claim( ) == IRQ_ACCEPT);370 rv = (irq->claim(irq->instance) == IRQ_ACCEPT); 369 371 } else { 370 372 /* Invoked by irq_find_and_lock() */
Note:
See TracChangeset
for help on using the changeset viewer.