Changes in kernel/generic/include/ddi/irq.h [da1bafb:d99c1d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ddi/irq.h
rda1bafb rd99c1d2 36 36 #define KERN_IRQ_H_ 37 37 38 #ifdef KERNEL39 40 #include <typedefs.h>41 #include <adt/list.h>42 #include <adt/hash_table.h>43 #include <synch/spinlock.h>44 #include <proc/task.h>45 #include <ipc/ipc.h>46 47 #endif /* KERNEL */48 49 38 typedef enum { 50 39 /** Read 1 byte from the I/O space. */ … … 60 49 /** Write 4 bytes to the I/O space. */ 61 50 CMD_PIO_WRITE_32, 62 63 51 /** 64 52 * Perform a bit test on the source argument and store the result into … … 66 54 */ 67 55 CMD_BTEST, 68 69 56 /** 70 57 * Predicate the execution of the following N commands by the boolean … … 72 59 */ 73 60 CMD_PREDICATE, 74 75 61 /** Accept the interrupt. */ 76 62 CMD_ACCEPT, … … 83 69 irq_cmd_type cmd; 84 70 void *addr; 85 u int32_tvalue;86 u intptr_t srcarg;87 u intptr_t dstarg;71 unsigned long long value; 72 unsigned int srcarg; 73 unsigned int dstarg; 88 74 } irq_cmd_t; 89 75 90 76 typedef struct { 91 size_t cmdcount;77 unsigned int cmdcount; 92 78 irq_cmd_t *cmds; 93 79 } irq_code_t; … … 95 81 #ifdef KERNEL 96 82 83 #include <typedefs.h> 84 #include <adt/list.h> 85 #include <adt/hash_table.h> 86 #include <synch/spinlock.h> 87 #include <proc/task.h> 88 #include <ipc/ipc.h> 89 97 90 typedef enum { 98 IRQ_DECLINE, 99 IRQ_ACCEPT 91 IRQ_DECLINE, /**< Decline to service. */ 92 IRQ_ACCEPT /**< Accept to service. */ 100 93 } irq_ownership_t; 101 94 … … 115 108 * Primarily, this structure is encapsulated in the irq_t structure. 116 109 * It is protected by irq_t::lock. 117 *118 110 */ 119 111 typedef struct { … … 125 117 unative_t method; 126 118 /** Arguments that will be sent if the IRQ is claimed. */ 127 u int32_t scratch[IPC_CALL_LEN];119 unative_t scratch[IPC_CALL_LEN]; 128 120 /** Top-half pseudocode. */ 129 121 irq_code_t *code; 130 122 /** Counter. */ 131 123 size_t counter; 132 133 124 /** 134 125 * Link between IRQs that are notifying the same answerbox. The list is … … 142 133 * If one device has multiple interrupts, there will be multiple irq_t 143 134 * instantions with the same devno. 144 *145 135 */ 146 136 typedef struct irq { 147 137 /** Hash table link. */ 148 138 link_t link; 149 139 150 140 /** Lock protecting everything in this structure 151 141 * except the link member. When both the IRQ … … 153 143 * this lock must not be taken first. 154 144 */ 155 IRQ_SPINLOCK_DECLARE(lock);145 SPINLOCK_DECLARE(lock); 156 146 157 147 /** Send EOI before processing the interrupt. … … 162 152 */ 163 153 bool preack; 164 154 165 155 /** Unique device number. -1 if not yet assigned. */ 166 156 devno_t devno; 167 157 168 158 /** Actual IRQ number. -1 if not yet assigned. */ 169 159 inr_t inr; … … 176 166 /** Instance argument for the handler and the claim function. */ 177 167 void *instance; 178 168 179 169 /** Clear interrupt routine. */ 180 170 cir_t cir; 181 171 /** First argument to the clear interrupt routine. */ 182 172 void *cir_arg; 183 173 184 174 /** Notification configuration structure. */ 185 175 ipc_notif_cfg_t notif_cfg; 186 176 } irq_t; 187 177 188 IRQ_SPINLOCK_EXTERN(irq_uspace_hash_table_lock);178 SPINLOCK_EXTERN(irq_uspace_hash_table_lock); 189 179 extern hash_table_t irq_uspace_hash_table; 190 180 … … 194 184 extern irq_t *irq_dispatch_and_lock(inr_t); 195 185 196 #endif /* KERNEL */186 #endif 197 187 198 188 #endif
Note:
See TracChangeset
for help on using the changeset viewer.