Changeset 2bc13887 in mainline for uspace/srv/vfs/vfs.c


Ignore:
Timestamp:
2011-08-17T15:07:20Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4aa39
Parents:
455f190
Message:

Add vfs_pass_handle().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs.c

    r455f190 r2bc13887  
    3737
    3838#include <ipc/services.h>
     39#include <abi/ipc/event.h>
     40#include <event.h>
    3941#include <ns.h>
    4042#include <async.h>
     
    130132}
    131133
     134enum {
     135        VFS_TASK_STATE_CHANGE
     136};
     137
     138static void notification_received(ipc_callid_t callid, ipc_call_t *call)
     139{
     140        switch (IPC_GET_IMETHOD(*call)) {
     141        case VFS_TASK_STATE_CHANGE:
     142                if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE)
     143                        vfs_pass_handle(IPC_GET_ARG4(*call),
     144                            IPC_GET_ARG5(*call), (int) IPC_GET_ARG2(*call));
     145                break;
     146        default:
     147                break;
     148        }
     149}
     150
    132151int main(int argc, char **argv)
    133152{
     
    170189
    171190        /*
     191         * Set notification handler and subscribe to notifications.
     192         */
     193        async_set_interrupt_received(notification_received);
     194        event_task_subscribe(EVENT_TASK_STATE_CHANGE, VFS_TASK_STATE_CHANGE);
     195
     196        /*
    172197         * Register at the naming service.
    173198         */
Note: See TracChangeset for help on using the changeset viewer.