Changes in uspace/srv/vfs/vfs.c [79ae36dd:0fe52ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.c
r79ae36dd r0fe52ef 36 36 */ 37 37 38 #include <vfs/vfs.h> 38 39 #include <ipc/services.h> 40 #include <abi/ipc/event.h> 41 #include <event.h> 39 42 #include <ns.h> 40 43 #include <async.h> … … 45 48 #include <as.h> 46 49 #include <atomic.h> 50 #include <macros.h> 47 51 #include "vfs.h" 48 52 49 53 #define NAME "vfs" 50 54 51 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall) 55 enum { 56 VFS_TASK_STATE_CHANGE 57 }; 58 59 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 52 60 { 53 61 bool cont = true; … … 80 88 vfs_open(callid, &call); 81 89 break; 82 case VFS_IN_OPEN_NODE:83 vfs_open_node(callid, &call);84 break;85 90 case VFS_IN_CLOSE: 86 91 vfs_close(callid, &call); … … 118 123 case VFS_IN_DUP: 119 124 vfs_dup(callid, &call); 125 break; 126 case VFS_IN_WAIT_HANDLE: 127 vfs_wait_handle(callid, &call); 128 break; 120 129 default: 121 130 async_answer_0(callid, ENOTSUP); … … 128 137 * connection fibril terminates. 129 138 */ 139 } 140 141 static void notification_received(ipc_callid_t callid, ipc_call_t *call) 142 { 143 switch (IPC_GET_IMETHOD(*call)) { 144 case VFS_TASK_STATE_CHANGE: 145 if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE) 146 vfs_pass_handle( 147 (task_id_t) MERGE_LOUP32(IPC_GET_ARG4(*call), 148 IPC_GET_ARG5(*call)), call->in_task_id, 149 (int) IPC_GET_ARG2(*call)); 150 break; 151 default: 152 break; 153 } 130 154 } 131 155 … … 170 194 171 195 /* 196 * Set notification handler and subscribe to notifications. 197 */ 198 async_set_interrupt_received(notification_received); 199 event_task_subscribe(EVENT_TASK_STATE_CHANGE, VFS_TASK_STATE_CHANGE); 200 201 /* 172 202 * Register at the naming service. 173 203 */
Note:
See TracChangeset
for help on using the changeset viewer.