Changes in uspace/srv/vfs/vfs_register.c [df908b3:eda925a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_register.c
rdf908b3 reda925a 39 39 #include <ipc/services.h> 40 40 #include <async.h> 41 #include <async_rel.h>42 41 #include <fibril.h> 43 #include <fibril_synch.h>44 42 #include <errno.h> 45 43 #include <stdio.h> 46 44 #include <stdlib.h> 47 #include <str .h>45 #include <string.h> 48 46 #include <ctype.h> 49 47 #include <bool.h> 48 #include <fibril_synch.h> 50 49 #include <adt/list.h> 51 50 #include <as.h> … … 253 252 int vfs_grab_phone(fs_handle_t handle) 254 253 { 255 link_t *cur;256 fs_info_t *fs;257 254 int phone; 258 255 … … 265 262 */ 266 263 fibril_mutex_lock(&fs_head_lock); 264 link_t *cur; 265 fs_info_t *fs; 267 266 for (cur = fs_head.next; cur != &fs_head; cur = cur->next) { 268 267 fs = list_get_instance(cur, fs_info_t, fs_link); … … 270 269 fibril_mutex_unlock(&fs_head_lock); 271 270 fibril_mutex_lock(&fs->phone_lock); 272 phone = async_relation_create(fs->phone);271 phone = ipc_connect_me_to(fs->phone, 0, 0, 0); 273 272 fibril_mutex_unlock(&fs->phone_lock); 274 273 … … 285 284 * @param phone Phone to FS task. 286 285 */ 287 void vfs_release_phone(fs_handle_t handle, int phone) 288 { 289 link_t *cur; 290 fs_info_t *fs; 291 292 fibril_mutex_lock(&fs_head_lock); 293 for (cur = fs_head.next; cur != &fs_head; cur = cur->next) { 294 fs = list_get_instance(cur, fs_info_t, fs_link); 295 if (fs->fs_handle == handle) { 296 fibril_mutex_unlock(&fs_head_lock); 297 fibril_mutex_lock(&fs->phone_lock); 298 async_relation_destroy(fs->phone, phone); 299 fibril_mutex_unlock(&fs->phone_lock); 300 return; 301 } 302 } 303 /* should not really get here */ 304 abort(); 305 fibril_mutex_unlock(&fs_head_lock); 286 void vfs_release_phone(int phone) 287 { 288 /* TODO: implement connection caching */ 289 ipc_hangup(phone); 306 290 } 307 291
Note:
See TracChangeset
for help on using the changeset viewer.