Changes in kernel/generic/src/ipc/irq.c [455241b:111b9b9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/irq.c
r455241b r111b9b9 295 295 } 296 296 297 static void irq_destroy( kobject_t*arg)298 { 299 irq_ kobject_t *kobj = (irq_kobject_t *) arg;300 301 irq_hash_out( &kobj->irq);297 static void irq_destroy(void *arg) 298 { 299 irq_t *irq = (irq_t *) arg; 300 301 irq_hash_out(irq); 302 302 303 303 /* Free up the IRQ code and associated structures. */ 304 code_free( kobj->irq.notif_cfg.code);305 slab_free(irq_cache, kobj);304 code_free(irq->notif_cfg.code); 305 slab_free(irq_cache, irq); 306 306 } 307 307 … … 350 350 } 351 351 352 irq_ kobject_t *kobj =slab_alloc(irq_cache, FRAME_ATOMIC);353 if (! kobj) {352 irq_t *irq = (irq_t *) slab_alloc(irq_cache, FRAME_ATOMIC); 353 if (!irq) { 354 354 cap_free(TASK, handle); 355 355 return ENOMEM; 356 356 } 357 357 358 kobject_initialize(&kobj->kobject, KOBJECT_TYPE_IRQ); 359 360 irq_t *irq = &kobj->irq; 358 kobject_t *kobject = kobject_alloc(FRAME_ATOMIC); 359 if (!kobject) { 360 cap_free(TASK, handle); 361 slab_free(irq_cache, irq); 362 return ENOMEM; 363 } 361 364 362 365 irq_initialize(irq); … … 382 385 irq_spinlock_unlock(&irq_uspace_hash_table_lock, true); 383 386 384 cap_publish(TASK, handle, &kobj->kobject); 387 kobject_initialize(kobject, KOBJECT_TYPE_IRQ, irq); 388 cap_publish(TASK, handle, kobject); 385 389 386 390 return EOK; … … 401 405 return ENOENT; 402 406 403 assert( irq_from_kobject(kobj)->notif_cfg.answerbox == box);404 405 irq_hash_out( irq_from_kobject(kobj));407 assert(kobj->irq->notif_cfg.answerbox == box); 408 409 irq_hash_out(kobj->irq); 406 410 407 411 kobject_put(kobj);
Note:
See TracChangeset
for help on using the changeset viewer.