Changeset 228e490 in mainline for kernel/generic/src/ipc/irq.c


Ignore:
Timestamp:
2010-12-14T17:00:02Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a9b6bec, eb221e5
Parents:
dd8d5a7
Message:

initial modifications for supporting declarative IPC interfaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/irq.c

    rdd8d5a7 r228e490  
    4242 *
    4343 * The structure of a notification message is as follows:
    44  * - METHOD: method as registered by the SYS_IPC_REGISTER_IRQ syscall
     44 * - IMETHOD: interface and method as registered by the SYS_IPC_REGISTER_IRQ
     45 *            syscall
    4546 * - ARG1: payload modified by a 'top-half' handler
    4647 * - ARG2: payload modified by a 'top-half' handler
     
    4950 * - ARG5: payload modified by a 'top-half' handler
    5051 * - in_phone_hash: interrupt counter (may be needed to assure correct order
    51  *         in multithreaded drivers)
     52 *                  in multithreaded drivers)
    5253 *
    5354 * Note on synchronization for ipc_irq_register(), ipc_irq_unregister(),
     
    130131/** Register an answerbox as a receiving end for IRQ notifications.
    131132 *
    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.
     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.
    137139 *
    138140 * @return EBADMEM, ENOENT or EEXISTS on failure or 0 on success.
     
    140142 */
    141143int ipc_irq_register(answerbox_t *box, inr_t inr, devno_t devno,
    142     sysarg_t method, irq_code_t *ucode)
     144    sysarg_t imethod, irq_code_t *ucode)
    143145{
    144146        sysarg_t key[] = {
     
    167169        irq->notif_cfg.notify = true;
    168170        irq->notif_cfg.answerbox = box;
    169         irq->notif_cfg.method = method;
     171        irq->notif_cfg.imethod = imethod;
    170172        irq->notif_cfg.code = code;
    171173        irq->notif_cfg.counter = 0;
     
    444446               
    445447                /* Set up args */
    446                 IPC_SET_METHOD(call->data, irq->notif_cfg.method);
     448                IPC_SET_IMETHOD(call->data, irq->notif_cfg.imethod);
    447449                IPC_SET_ARG1(call->data, irq->notif_cfg.scratch[1]);
    448450                IPC_SET_ARG2(call->data, irq->notif_cfg.scratch[2]);
     
    481483                call->priv = ++irq->notif_cfg.counter;
    482484               
    483                 IPC_SET_METHOD(call->data, irq->notif_cfg.method);
     485                IPC_SET_IMETHOD(call->data, irq->notif_cfg.imethod);
    484486                IPC_SET_ARG1(call->data, a1);
    485487                IPC_SET_ARG2(call->data, a2);
Note: See TracChangeset for help on using the changeset viewer.