Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5863a95 in mainline for kernel/generic/src/ipc/irq.c


Ignore:
Timestamp:
2010-12-17T08:59:35Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
58854f2
Parents:
70e5ad5 (diff), 11658b64 (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.
Message:

Merge development/ changes

File:
1 edited

Legend:

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

    r70e5ad5 r5863a95  
    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     unative_t method, irq_code_t *ucode)
    143 {
    144         unative_t key[] = {
    145                 (unative_t) inr,
    146                 (unative_t) devno
     144    sysarg_t imethod, irq_code_t *ucode)
     145{
     146        sysarg_t key[] = {
     147                (sysarg_t) inr,
     148                (sysarg_t) devno
    147149        };
    148150       
     
    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;
     
    213215int ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno)
    214216{
    215         unative_t key[] = {
    216                 (unative_t) inr,
    217                 (unative_t) devno
     217        sysarg_t key[] = {
     218                (sysarg_t) inr,
     219                (sysarg_t) devno
    218220        };
    219221       
     
    290292                }
    291293               
    292                 unative_t key[2];
     294                sysarg_t key[2];
    293295                key[0] = irq->inr;
    294296                key[1] = irq->devno;
     
    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]);
     
    465467 *
    466468 */
    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)
     469void ipc_irq_send_msg(irq_t *irq, sysarg_t a1, sysarg_t a2, sysarg_t a3,
     470    sysarg_t a4, sysarg_t a5)
    469471{
    470472        irq_spinlock_lock(&irq->lock, true);
     
    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.