Changes in kernel/generic/src/ipc/irq.c [228e490:1d432f9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/irq.c
r228e490 r1d432f9 42 42 * 43 43 * The structure of a notification message is as follows: 44 * - IMETHOD: interface and method as registered by the SYS_IPC_REGISTER_IRQ 45 * syscall 44 * - METHOD: method as registered by the SYS_IPC_REGISTER_IRQ syscall 46 45 * - ARG1: payload modified by a 'top-half' handler 47 46 * - ARG2: payload modified by a 'top-half' handler … … 50 49 * - ARG5: payload modified by a 'top-half' handler 51 50 * - in_phone_hash: interrupt counter (may be needed to assure correct order 52 * 51 * in multithreaded drivers) 53 52 * 54 53 * Note on synchronization for ipc_irq_register(), ipc_irq_unregister(), … … 131 130 /** Register an answerbox as a receiving end for IRQ notifications. 132 131 * 133 * @param box Receiving answerbox. 134 * @param inr IRQ number. 135 * @param devno Device number. 136 * @param imethod Interface and method to be associated 137 * with the notification. 138 * @param ucode Uspace pointer to top-half pseudocode. 132 * @param box Receiving answerbox. 133 * @param inr IRQ number. 134 * @param devno Device number. 135 * @param method Method to be associated with the notification. 136 * @param ucode Uspace pointer to top-half pseudocode. 139 137 * 140 138 * @return EBADMEM, ENOENT or EEXISTS on failure or 0 on success. … … 142 140 */ 143 141 int ipc_irq_register(answerbox_t *box, inr_t inr, devno_t devno, 144 sysarg_t imethod, irq_code_t *ucode)145 { 146 sysarg_t key[] = {147 ( sysarg_t) inr,148 ( sysarg_t) devno142 unative_t method, irq_code_t *ucode) 143 { 144 unative_t key[] = { 145 (unative_t) inr, 146 (unative_t) devno 149 147 }; 150 148 … … 169 167 irq->notif_cfg.notify = true; 170 168 irq->notif_cfg.answerbox = box; 171 irq->notif_cfg. imethod = imethod;169 irq->notif_cfg.method = method; 172 170 irq->notif_cfg.code = code; 173 171 irq->notif_cfg.counter = 0; … … 215 213 int ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno) 216 214 { 217 sysarg_t key[] = {218 ( sysarg_t) inr,219 ( sysarg_t) devno215 unative_t key[] = { 216 (unative_t) inr, 217 (unative_t) devno 220 218 }; 221 219 … … 292 290 } 293 291 294 sysarg_t key[2];292 unative_t key[2]; 295 293 key[0] = irq->inr; 296 294 key[1] = irq->devno; … … 446 444 447 445 /* Set up args */ 448 IPC_SET_ IMETHOD(call->data, irq->notif_cfg.imethod);446 IPC_SET_METHOD(call->data, irq->notif_cfg.method); 449 447 IPC_SET_ARG1(call->data, irq->notif_cfg.scratch[1]); 450 448 IPC_SET_ARG2(call->data, irq->notif_cfg.scratch[2]); … … 467 465 * 468 466 */ 469 void ipc_irq_send_msg(irq_t *irq, sysarg_t a1, sysarg_t a2, sysarg_t a3,470 sysarg_t a4, sysarg_t a5)467 void ipc_irq_send_msg(irq_t *irq, unative_t a1, unative_t a2, unative_t a3, 468 unative_t a4, unative_t a5) 471 469 { 472 470 irq_spinlock_lock(&irq->lock, true); … … 483 481 call->priv = ++irq->notif_cfg.counter; 484 482 485 IPC_SET_ IMETHOD(call->data, irq->notif_cfg.imethod);483 IPC_SET_METHOD(call->data, irq->notif_cfg.method); 486 484 IPC_SET_ARG1(call->data, a1); 487 485 IPC_SET_ARG2(call->data, a2);
Note:
See TracChangeset
for help on using the changeset viewer.