Changeset 42a619b in mainline for uspace/srv/vfs/vfs.c


Ignore:
Timestamp:
2011-08-19T08:58:50Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7dcb7981, 903bac0a, c2cf033
Parents:
ef7052ec (diff), d894fbd (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 from lp:~jakub/helenos/camp2011.

File:
1 edited

Legend:

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

    ref7052ec r42a619b  
    3737
    3838#include <ipc/services.h>
     39#include <abi/ipc/event.h>
     40#include <event.h>
    3941#include <ns.h>
    4042#include <async.h>
     
    4547#include <as.h>
    4648#include <atomic.h>
     49#include <vfs/vfs.h>
    4750#include "vfs.h"
    4851
     
    8083                        vfs_open(callid, &call);
    8184                        break;
    82                 case VFS_IN_OPEN_NODE:
    83                         vfs_open_node(callid, &call);
    84                         break;
    8585                case VFS_IN_CLOSE:
    8686                        vfs_close(callid, &call);
     
    118118                case VFS_IN_DUP:
    119119                        vfs_dup(callid, &call);
     120                        break;
     121                case VFS_IN_WAIT_HANDLE:
     122                        vfs_wait_handle(callid, &call);
     123                        break;
    120124                default:
    121125                        async_answer_0(callid, ENOTSUP);
     
    128132         * connection fibril terminates.
    129133         */
     134}
     135
     136enum {
     137        VFS_TASK_STATE_CHANGE
     138};
     139
     140static void notification_received(ipc_callid_t callid, ipc_call_t *call)
     141{
     142        switch (IPC_GET_IMETHOD(*call)) {
     143        case VFS_TASK_STATE_CHANGE:
     144                if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE)
     145                        vfs_pass_handle(IPC_GET_ARG4(*call),
     146                            IPC_GET_ARG5(*call), (int) IPC_GET_ARG2(*call));
     147                break;
     148        default:
     149                break;
     150        }
    130151}
    131152
     
    170191
    171192        /*
     193         * Set notification handler and subscribe to notifications.
     194         */
     195        async_set_interrupt_received(notification_received);
     196        event_task_subscribe(EVENT_TASK_STATE_CHANGE, VFS_TASK_STATE_CHANGE);
     197
     198        /*
    172199         * Register at the naming service.
    173200         */
Note: See TracChangeset for help on using the changeset viewer.