Changeset 20235a3 in mainline for uspace/srv/vfs/vfs_register.c
- Timestamp:
- 2010-09-02T20:55:28Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0c39b96
- Parents:
- 0c61955 (diff), 3249673 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_register.c
r0c61955 r20235a3 39 39 #include <ipc/services.h> 40 40 #include <async.h> 41 #include <async_rel.h> 41 42 #include <fibril.h> 43 #include <fibril_synch.h> 42 44 #include <errno.h> 43 45 #include <stdio.h> … … 46 48 #include <ctype.h> 47 49 #include <bool.h> 48 #include <fibril_synch.h>49 50 #include <adt/list.h> 50 51 #include <as.h> … … 252 253 int vfs_grab_phone(fs_handle_t handle) 253 254 { 255 link_t *cur; 256 fs_info_t *fs; 254 257 int phone; 255 258 … … 262 265 */ 263 266 fibril_mutex_lock(&fs_head_lock); 264 link_t *cur;265 fs_info_t *fs;266 267 for (cur = fs_head.next; cur != &fs_head; cur = cur->next) { 267 268 fs = list_get_instance(cur, fs_info_t, fs_link); … … 269 270 fibril_mutex_unlock(&fs_head_lock); 270 271 fibril_mutex_lock(&fs->phone_lock); 271 phone = ipc_connect_me_to(fs->phone, 0, 0, 0);272 phone = async_relation_create(fs->phone); 272 273 fibril_mutex_unlock(&fs->phone_lock); 273 274 … … 284 285 * @param phone Phone to FS task. 285 286 */ 286 void vfs_release_phone(int phone) 287 { 288 /* TODO: implement connection caching */ 289 ipc_hangup(phone); 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); 290 306 } 291 307
Note:
See TracChangeset
for help on using the changeset viewer.