Changeset 63530c62 in mainline for kernel/generic/src/ddi/irq.c
- Timestamp:
- 2006-10-14T19:31:03Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e3890b3f
- Parents:
- 7dcf22a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ddi/irq.c
r7dcf22a r63530c62 64 64 #include <typedefs.h> 65 65 #include <synch/spinlock.h> 66 #include <atomic.h> 66 67 #include <arch.h> 67 68 … … 128 129 { 129 130 link_initialize(&irq->link); 131 spinlock_initialize(&irq->lock, "irq.lock"); 130 132 irq->inr = -1; 131 133 irq->devno = -1; 132 irq->notif = 0;133 134 irq->trigger = 0; 134 135 irq->claim = NULL; 135 136 irq->handler = NULL; 136 137 irq->arg = NULL; 138 irq->notif_answerbox = NULL; 139 irq->code = NULL; 140 atomic_set(&irq->counter, 0); 137 141 } 138 142 … … 221 225 irq_t *irq = hash_table_get_instance(item, irq_t, link); 222 226 inr_t *inr = (inr_t *) key; 223 224 return ((irq->inr == *inr) && (irq->claim() == IRQ_ACCEPT)); 227 bool rv; 228 229 spinlock_lock(&irq->lock); 230 rv = ((irq->inr == *inr) && (irq->claim() == IRQ_ACCEPT)); 231 spinlock_unlock(&irq->lock); 232 233 return rv; 225 234 } 226 235 … … 260 269 { 261 270 irq_t *irq = list_get_instance(item, irq_t, link); 262 263 return (irq->claim() == IRQ_ACCEPT); 271 bool rv; 272 273 spinlock_lock(&irq->lock); 274 rv = (irq->claim() == IRQ_ACCEPT); 275 spinlock_unlock(&irq->lock); 276 277 return rv; 264 278 } 265 279
Note:
See TracChangeset
for help on using the changeset viewer.