Changeset 3422fb6 in mainline
- Timestamp:
- 2017-09-03T19:23:25Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a5d0143
- Parents:
- 9306cd7
- Location:
- kernel/generic
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ddi/irq.h
r9306cd7 r3422fb6 90 90 /** Counter. */ 91 91 size_t counter; 92 93 /**94 * Link between IRQs that are notifying the same answerbox. The list is95 * protected by the answerbox irq_lock.96 */97 link_t link;98 92 } ipc_notif_cfg_t; 99 93 -
kernel/generic/include/ipc/ipc.h
r9306cd7 r3422fb6 92 92 /** Notifications from IRQ handlers. */ 93 93 list_t irq_notifs; 94 /** IRQs with notifications to this answerbox. */95 list_t irq_list;96 94 } answerbox_t; 97 95 -
kernel/generic/src/ddi/irq.c
r9306cd7 r3422fb6 110 110 link_initialize(&irq->link); 111 111 irq_spinlock_initialize(&irq->lock, "irq.lock"); 112 link_initialize(&irq->notif_cfg.link);113 112 irq->inr = -1; 114 113 -
kernel/generic/src/ipc/ipc.c
r9306cd7 r3422fb6 147 147 list_initialize(&box->answers); 148 148 list_initialize(&box->irq_notifs); 149 list_initialize(&box->irq_list);150 149 box->task = task; 151 150 } -
kernel/generic/src/ipc/irq.c
r9306cd7 r3422fb6 347 347 irq_spinlock_lock(&irq_uspace_hash_table_lock, true); 348 348 irq_spinlock_lock(&irq->lock, false); 349 irq_spinlock_lock(&box->irq_lock, false);350 349 351 350 cap->type = CAP_TYPE_IRQ; 352 351 hash_table_insert(&irq_uspace_hash_table, key, &irq->link); 353 list_append(&irq->notif_cfg.link, &box->irq_list); 354 355 irq_spinlock_unlock(&box->irq_lock, false); 352 356 353 irq_spinlock_unlock(&irq->lock, false); 357 354 irq_spinlock_unlock(&irq_uspace_hash_table_lock, true); … … 383 380 irq_spinlock_lock(&irq_uspace_hash_table_lock, true); 384 381 irq_spinlock_lock(&irq->lock, false); 385 irq_spinlock_lock(&box->irq_lock, false);386 382 387 383 assert(irq->notif_cfg.answerbox == box); 388 389 /* Remove the IRQ from the answerbox's list. */390 list_remove(&irq->notif_cfg.link);391 384 392 385 /* Remove the IRQ from the uspace IRQ hash table. */ 393 386 hash_table_remove_item(&irq_uspace_hash_table, &irq->link); 394 387 395 irq_spinlock_unlock(&box->irq_lock, false);396 388 /* irq->lock unlocked by the hash table remove_callback */ 397 389 irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
Note:
See TracChangeset
for help on using the changeset viewer.