Changeset 431c402 in mainline
- Timestamp:
- 2017-09-04T20:08:28Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e5f5ce0
- Parents:
- fa32c9f
- Location:
- kernel/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ddi/irq.h
rfa32c9f r431c402 43 43 #include <proc/task.h> 44 44 #include <ipc/ipc.h> 45 #include <mm/slab.h> 45 46 46 47 typedef enum { … … 139 140 extern hash_table_t irq_uspace_hash_table; 140 141 142 extern slab_cache_t *irq_slab; 143 141 144 extern inr_t last_inr; 142 145 -
kernel/generic/src/ddi/irq.c
rfa32c9f r431c402 49 49 #include <arch.h> 50 50 51 slab_cache_t *irq_slab = NULL; 52 51 53 /** Spinlock protecting the kernel IRQ hash table 52 54 * … … 95 97 buckets = chains; 96 98 last_inr = inrs - 1; 99 100 irq_slab = slab_cache_create("irq_t", sizeof(irq_t), 0, NULL, NULL, 101 FRAME_ATOMIC); 102 assert(irq_slab); 97 103 98 104 hash_table_create(&irq_uspace_hash_table, chains, 2, &irq_ht_ops); -
kernel/generic/src/ipc/irq.c
rfa32c9f r431c402 308 308 return handle; 309 309 310 irq_t *irq = (irq_t *) malloc(sizeof(irq_t), FRAME_ATOMIC);310 irq_t *irq = (irq_t *) slab_alloc(irq_slab, FRAME_ATOMIC); 311 311 if (!irq) { 312 312 cap_free(TASK, handle); … … 384 384 385 385 /* Free up the IRQ capability and the underlying kernel object. */ 386 free(cap->kobject);386 slab_free(irq_slab, cap->kobject); 387 387 cap_free(TASK, handle); 388 388
Note:
See TracChangeset
for help on using the changeset viewer.