Changeset 8820544 in mainline for uspace/srv/vfs/vfs.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/srv/vfs/vfs.c

    r83f29e0 r8820544  
    3838#include <vfs/vfs.h>
    3939#include <ipc/services.h>
    40 #include <abi/ipc/event.h>
    41 #include <event.h>
    4240#include <ns.h>
    4341#include <async.h>
     
    5351#define NAME  "vfs"
    5452
    55 enum {
    56         VFS_TASK_STATE_CHANGE
    57 };
    58 
    5953static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    6054{
     
    145139}
    146140
    147 static void notification_received(ipc_callid_t callid, ipc_call_t *call)
     141static void notification_handler(ipc_callid_t callid, ipc_call_t *call, void *arg)
    148142{
    149         switch (IPC_GET_IMETHOD(*call)) {
    150         case VFS_TASK_STATE_CHANGE:
    151                 if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE)
    152                         vfs_pass_handle(
    153                             (task_id_t) MERGE_LOUP32(IPC_GET_ARG4(*call),
    154                             IPC_GET_ARG5(*call)), call->in_task_id,
    155                             (int) IPC_GET_ARG2(*call));
    156                 break;
    157         default:
    158                 break;
    159         }
     143        if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE)
     144                vfs_pass_handle(
     145                    (task_id_t) MERGE_LOUP32(IPC_GET_ARG4(*call),
     146                    IPC_GET_ARG5(*call)), call->in_task_id,
     147                    (int) IPC_GET_ARG2(*call));
    160148}
    161149
     
    196184
    197185        /*
    198          * Set notification handler and subscribe to notifications.
    199          */
    200         async_set_interrupt_received(notification_received);
    201         event_task_subscribe(EVENT_TASK_STATE_CHANGE, VFS_TASK_STATE_CHANGE);
     186         * Subscribe to notifications.
     187         */
     188        async_event_task_subscribe(EVENT_TASK_STATE_CHANGE, notification_handler,
     189            NULL);
    202190       
    203191        /*
Note: See TracChangeset for help on using the changeset viewer.