Changes in kernel/generic/src/ipc/irq.c [c1f68b0:9233e9d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/irq.c
rc1f68b0 r9233e9d 294 294 /* Free up the IRQ code and associated structures. */ 295 295 code_free(irq->notif_cfg.code); 296 slab_free(irq_ slab, irq);296 slab_free(irq_cache, irq); 297 297 } 298 298 … … 308 308 * @param ucode Uspace pointer to top-half IRQ code. 309 309 * 310 * @return IRQ capability handle. 311 * @return Negative error code. 310 * @param[out] uspace_handle Uspace pointer to IRQ capability handle 311 * 312 * @return Error code. 312 313 * 313 314 */ 314 315 int ipc_irq_subscribe(answerbox_t *box, inr_t inr, sysarg_t imethod, 315 irq_code_t *ucode )316 irq_code_t *ucode, cap_handle_t *uspace_handle) 316 317 { 317 318 if ((inr < 0) || (inr > last_inr)) … … 333 334 return handle; 334 335 335 irq_t *irq = (irq_t *) slab_alloc(irq_slab, FRAME_ATOMIC); 336 int rc = copy_to_uspace(uspace_handle, &handle, sizeof(cap_handle_t)); 337 if (rc != EOK) { 338 cap_free(TASK, handle); 339 return rc; 340 } 341 342 irq_t *irq = (irq_t *) slab_alloc(irq_cache, FRAME_ATOMIC); 336 343 if (!irq) { 337 344 cap_free(TASK, handle); … … 342 349 if (!kobject) { 343 350 cap_free(TASK, handle); 344 slab_free(irq_ slab, irq);351 slab_free(irq_cache, irq); 345 352 return ENOMEM; 346 353 } … … 371 378 cap_publish(TASK, handle, kobject); 372 379 373 return handle;380 return EOK; 374 381 } 375 382
Note:
See TracChangeset
for help on using the changeset viewer.