Changeset 8820544 in mainline for uspace/lib/c/generic/event.c


Ignore:
Timestamp:
2014-08-16T00:02:04Z (10 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)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/event.c

    r83f29e0 r8820544  
    3838
    3939#include <libc.h>
    40 #include <event.h>
     40#include <ipc/event.h>
    4141
    42 /** Subscribe event notifications.
     42/** Subscribe to event notifications.
    4343 *
    4444 * @param evno    Event type to subscribe.
     
    4848 *
    4949 */
    50 int event_subscribe(event_type_t evno, sysarg_t imethod)
     50int ipc_event_subscribe(event_type_t evno, sysarg_t imethod)
    5151{
    52         return __SYSCALL2(SYS_EVENT_SUBSCRIBE, (sysarg_t) evno,
     52        return __SYSCALL2(SYS_IPC_EVENT_SUBSCRIBE, (sysarg_t) evno,
    5353            (sysarg_t) imethod);
    5454}
    5555
    56 int event_task_subscribe(event_task_type_t evno, sysarg_t imethod)
     56/** Subscribe to task event notifications.
     57 *
     58 * @param evno    Event type to subscribe.
     59 * @param imethod Use this interface and method for notifying me.
     60 *
     61 * @return Value returned by the kernel.
     62 *
     63 */
     64int ipc_event_task_subscribe(event_task_type_t evno, sysarg_t imethod)
    5765{
    58         return __SYSCALL2(SYS_EVENT_SUBSCRIBE, (sysarg_t) evno,
     66        return __SYSCALL2(SYS_IPC_EVENT_SUBSCRIBE, (sysarg_t) evno,
    5967            (sysarg_t) imethod);
     68}
     69
     70/** Unsubscribe from event notifications.
     71 *
     72 * @param evno    Event type to unsubscribe.
     73 *
     74 * @return Value returned by the kernel.
     75 *
     76 */
     77int ipc_event_unsubscribe(event_type_t evno)
     78{
     79        return __SYSCALL1(SYS_IPC_EVENT_UNSUBSCRIBE, (sysarg_t) evno);
     80}
     81
     82/** Unsubscribe from task event notifications.
     83 *
     84 * @param evno    Event type to unsubscribe.
     85 *
     86 * @return Value returned by the kernel.
     87 *
     88 */
     89int ipc_event_task_unsubscribe(event_task_type_t evno)
     90{
     91        return __SYSCALL1(SYS_IPC_EVENT_UNSUBSCRIBE, (sysarg_t) evno);
    6092}
    6193
     
    6799 *
    68100 */
    69 int event_unmask(event_type_t evno)
     101int ipc_event_unmask(event_type_t evno)
    70102{
    71         return __SYSCALL1(SYS_EVENT_UNMASK, (sysarg_t) evno);
     103        return __SYSCALL1(SYS_IPC_EVENT_UNMASK, (sysarg_t) evno);
    72104}
    73105
    74 int event_task_unmask(event_task_type_t evno)
     106/** Unmask task event notifications.
     107 *
     108 * @param evno Event type to unmask.
     109 *
     110 * @return Value returned by the kernel.
     111 *
     112 */
     113int ipc_event_task_unmask(event_task_type_t evno)
    75114{
    76         return __SYSCALL1(SYS_EVENT_UNMASK, (sysarg_t) evno);
     115        return __SYSCALL1(SYS_IPC_EVENT_UNMASK, (sysarg_t) evno);
    77116}
    78117
Note: See TracChangeset for help on using the changeset viewer.