Changes in uspace/srv/vfs/vfs_register.c [4791e3c:228e490] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_register.c
r4791e3c r228e490 39 39 #include <ipc/services.h> 40 40 #include <async.h> 41 #include <async_rel.h> 41 42 #include <fibril.h> 42 43 #include <fibril_synch.h> … … 110 111 void vfs_register(ipc_callid_t rid, ipc_call_t *request) 111 112 { 112 int phone;113 114 113 dprintf("Processing VFS_REGISTER request received from %p.\n", 115 114 request->in_phone_hash); … … 137 136 138 137 link_initialize(&fs_info->fs_link); 138 fibril_mutex_initialize(&fs_info->phone_lock); 139 139 fs_info->vfs_info = *vfs_info; 140 140 free(vfs_info); … … 186 186 return; 187 187 } 188 189 phone = IPC_GET_ARG5(call); 190 async_session_create(&fs_info->session, phone); 188 fs_info->phone = IPC_GET_ARG5(call); 191 189 ipc_answer_0(callid, EOK); 192 190 … … 202 200 list_remove(&fs_info->fs_link); 203 201 fibril_mutex_unlock(&fs_head_lock); 204 async_session_destroy(&fs_info->session); 205 ipc_hangup(phone); 202 ipc_hangup(fs_info->phone); 206 203 free(fs_info); 207 204 ipc_answer_0(callid, EINVAL); … … 217 214 list_remove(&fs_info->fs_link); 218 215 fibril_mutex_unlock(&fs_head_lock); 219 async_session_destroy(&fs_info->session); 220 ipc_hangup(phone); 216 ipc_hangup(fs_info->phone); 221 217 free(fs_info); 222 218 ipc_answer_0(callid, EINVAL); … … 273 269 if (fs->fs_handle == handle) { 274 270 fibril_mutex_unlock(&fs_head_lock); 275 phone = async_exchange_begin(&fs->session); 271 fibril_mutex_lock(&fs->phone_lock); 272 phone = async_relation_create(fs->phone); 273 fibril_mutex_unlock(&fs->phone_lock); 276 274 277 275 assert(phone > 0); … … 297 295 if (fs->fs_handle == handle) { 298 296 fibril_mutex_unlock(&fs_head_lock); 299 async_exchange_end(&fs->session, phone); 297 fibril_mutex_lock(&fs->phone_lock); 298 async_relation_destroy(fs->phone, phone); 299 fibril_mutex_unlock(&fs->phone_lock); 300 300 return; 301 301 }
Note:
See TracChangeset
for help on using the changeset viewer.