Changeset 6caf5fb in mainline for kernel/generic/src/ipc/irq.c
- Timestamp:
- 2025-01-16T21:42:15Z (20 hours ago)
- Parents:
- e0e2264 (diff), 455241b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-16 21:42:15)
- git-committer:
- GitHub <noreply@…> (2025-01-16 21:42:15)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/irq.c
re0e2264 r6caf5fb 295 295 } 296 296 297 static void irq_destroy( void*arg)298 { 299 irq_ t *irq = (irq_t *) arg;300 301 irq_hash_out( irq);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); 302 302 303 303 /* Free up the IRQ code and associated structures. */ 304 code_free( irq->notif_cfg.code);305 slab_free(irq_cache, irq);304 code_free(kobj->irq.notif_cfg.code); 305 slab_free(irq_cache, kobj); 306 306 } 307 307 … … 350 350 } 351 351 352 irq_ t *irq = (irq_t *)slab_alloc(irq_cache, FRAME_ATOMIC);353 if (! irq) {352 irq_kobject_t *kobj = slab_alloc(irq_cache, FRAME_ATOMIC); 353 if (!kobj) { 354 354 cap_free(TASK, handle); 355 355 return ENOMEM; 356 356 } 357 357 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 } 358 kobject_initialize(&kobj->kobject, KOBJECT_TYPE_IRQ); 359 360 irq_t *irq = &kobj->irq; 364 361 365 362 irq_initialize(irq); … … 385 382 irq_spinlock_unlock(&irq_uspace_hash_table_lock, true); 386 383 387 kobject_initialize(kobject, KOBJECT_TYPE_IRQ, irq); 388 cap_publish(TASK, handle, kobject); 384 cap_publish(TASK, handle, &kobj->kobject); 389 385 390 386 return EOK; … … 405 401 return ENOENT; 406 402 407 assert( kobj->irq->notif_cfg.answerbox == box);408 409 irq_hash_out( kobj->irq);403 assert(irq_from_kobject(kobj)->notif_cfg.answerbox == box); 404 405 irq_hash_out(irq_from_kobject(kobj)); 410 406 411 407 kobject_put(kobj);
Note:
See TracChangeset
for help on using the changeset viewer.