Changes in kernel/generic/src/ddi/irq.c [455241b:0db0df2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ddi/irq.c
r455241b r0db0df2 50 50 #include <arch.h> 51 51 52 slab_cache_t *irq_cache = NULL; 53 52 54 /** Spinlock protecting the kernel IRQ hash table 53 55 * … … 73 75 static size_t irq_ht_key_hash(const void *); 74 76 static bool irq_ht_equal(const ht_link_t *, const ht_link_t *); 75 static bool irq_ht_key_equal(const void *, const ht_link_t *);77 static bool irq_ht_key_equal(const void *, size_t, const ht_link_t *); 76 78 77 79 static const hash_table_ops_t irq_ht_ops = { … … 95 97 last_inr = inrs - 1; 96 98 99 irq_cache = slab_cache_create("irq_t", sizeof(irq_t), 0, NULL, NULL, 100 FRAME_ATOMIC); 101 assert(irq_cache); 102 97 103 hash_table_create(&irq_uspace_hash_table, chains, 0, &irq_ht_ops); 98 104 hash_table_create(&irq_kernel_hash_table, chains, 0, &irq_ht_ops); … … 135 141 { 136 142 irq_spinlock_lock(l, false); 137 ht_link_t *first = hash_table_find(h, &inr); 138 for (ht_link_t *lnk = first; lnk; 139 lnk = hash_table_find_next(h, first, lnk)) { 140 irq_t *irq = hash_table_get_inst(lnk, irq_t, link); 143 144 hash_table_foreach(h, &inr, link, irq_t, irq) { 141 145 irq_spinlock_lock(&irq->lock, false); 142 146 if (irq->claim(irq) == IRQ_ACCEPT) { … … 147 151 irq_spinlock_unlock(&irq->lock, false); 148 152 } 153 149 154 irq_spinlock_unlock(l, false); 150 155 … … 217 222 218 223 /** Return true if the key is equal to the item's lookup key. */ 219 bool irq_ht_key_equal(const void *key, const ht_link_t *item)224 bool irq_ht_key_equal(const void *key, size_t hash, const ht_link_t *item) 220 225 { 221 226 const inr_t *inr = key;
Note:
See TracChangeset
for help on using the changeset viewer.