Changeset 8820544 in mainline for uspace/app


Ignore:
Timestamp:
2014-08-16T00:02:04Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
35b8bfe, 8cd680c
Parents:
83f29e0
Message:

support for kernel notification multiplexing in the async framework

  • rename SYS_EVENT_* and SYS_IRQ_* syscalls to unify the terminology
  • add SYS_IPC_EVENT_UNSUBSCRIBE
  • remove IRQ handler multiplexing from DDF, the generic mechanism replaces it (unfortunatelly the order of arguments used by interrupt_handler_t needs to be permutated to align with the async framework conventions)
Location:
uspace/app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/kio/kio.c

    r83f29e0 r8820544  
    3939#include <as.h>
    4040#include <ddi.h>
    41 #include <event.h>
    4241#include <errno.h>
    4342#include <str_error.h>
     
    149148 *
    150149 */
    151 static void notification_received(ipc_callid_t callid, ipc_call_t *call)
     150static void kio_notification_handler(ipc_callid_t callid, ipc_call_t *call,
     151    void *arg)
    152152{
    153153        /*
     
    181181                producer(kio_stored, kio + offset);
    182182       
    183         event_unmask(EVENT_KIO);
     183        async_event_unmask(EVENT_KIO);
    184184        fibril_mutex_unlock(&mtx);
    185185}
     
    214214       
    215215        prodcons_initialize(&pc);
    216         async_set_interrupt_received(notification_received);
    217         rc = event_subscribe(EVENT_KIO, 0);
     216        rc = async_event_subscribe(EVENT_KIO, kio_notification_handler, NULL);
    218217        if (rc != EOK) {
    219218                fprintf(stderr, "%s: Unable to register kio notifications\n",
     
    233232                fprintf(stderr, "%s: Could not create input\n", NAME);
    234233                return ENOMEM;
    235         }       
     234        }
    236235
    237236        fibril_add_ready(fid);
    238         event_unmask(EVENT_KIO);
     237        async_event_unmask(EVENT_KIO);
    239238        kio_update();
    240239       
     
    251250                free(str);
    252251        }
    253  
     252
    254253        if (rc == ENOENT)
    255                 rc = EOK;       
     254                rc = EOK;
    256255
    257256        return EOK;
  • uspace/app/trace/syscalls.c

    r83f29e0 r8820544  
    6565    [SYS_IPC_HANGUP] = { "ipc_hangup",                  1,      V_ERRNO },
    6666
    67     [SYS_EVENT_SUBSCRIBE] = { "event_subscribe",        2,      V_ERRNO },
     67    [SYS_IPC_EVENT_SUBSCRIBE] = { "ipc_event_subscribe",        2,      V_ERRNO },
     68    [SYS_IPC_EVENT_UNSUBSCRIBE] = { "ipc_event_unsubscribe",    1,      V_ERRNO },
     69    [SYS_IPC_EVENT_UNMASK] = { "ipc_event_unmask",      1,      V_ERRNO },
    6870
    6971    [SYS_CAP_GRANT] = { "cap_grant",                    2,      V_ERRNO },
     
    7173    [SYS_PHYSMEM_MAP] = { "physmem_map",                4,      V_ERRNO },
    7274    [SYS_IOSPACE_ENABLE] = { "iospace_enable",          1,      V_ERRNO },
    73     [SYS_IRQ_REGISTER] = { "irq_register",      4,      V_ERRNO },
    74     [SYS_IRQ_UNREGISTER] = { "irq_unregister",  2,      V_ERRNO },
     75
     76    [SYS_IPC_IRQ_SUBSCRIBE] = { "ipc_irq_subscribe",    4,      V_ERRNO },
     77    [SYS_IPC_IRQ_UNSUBSCRIBE] = { "ipc_irq_unsubscribe",        2,      V_ERRNO },
    7578
    7679    [SYS_SYSINFO_GET_VAL_TYPE] = { "sysinfo_get_val_type",              2,      V_INTEGER },
Note: See TracChangeset for help on using the changeset viewer.