Changeset 63d8f43 in mainline for kernel/generic/src/ipc/irq.c
- Timestamp:
- 2017-09-04T19:38:28Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fa32c9f
- Parents:
- 30c27e9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/irq.c
r30c27e9 r63d8f43 307 307 if (handle < 0) 308 308 return handle; 309 310 irq_t *irq = (irq_t *) malloc(sizeof(irq_t), FRAME_ATOMIC); 311 if (!irq) { 312 cap_free(TASK, handle); 313 return ENOMEM; 314 } 315 309 316 cap_t *cap = cap_get_current(handle, CAP_TYPE_ALLOCATED); 310 317 assert(cap); 311 318 312 irq_t *irq = &cap->irq;313 319 irq_initialize(irq); 314 320 irq->inr = inr; … … 321 327 irq->notif_cfg.counter = 0; 322 328 329 cap->kobject = (void *) irq; 330 323 331 /* 324 332 * Insert the IRQ structure into the uspace IRQ hash table and retype … … 359 367 irq_spinlock_unlock(&TASK->lock, true); 360 368 361 irq_t *irq = &cap->irq;369 irq_t *irq = (irq_t *) cap->kobject; 362 370 363 371 irq_spinlock_lock(&irq_uspace_hash_table_lock, true); … … 376 384 377 385 /* Free up the IRQ capability and the underlying kernel object. */ 386 free(cap->kobject); 378 387 cap_free(TASK, handle); 379 388
Note:
See TracChangeset
for help on using the changeset viewer.