Ignore:
File:
1 edited

Legend:

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

    rdf908b3 r19f857a  
    3939#include <ipc/services.h>
    4040#include <async.h>
    41 #include <async_rel.h>
    4241#include <fibril.h>
    43 #include <fibril_synch.h>
    4442#include <errno.h>
    4543#include <stdio.h>
     
    4846#include <ctype.h>
    4947#include <bool.h>
     48#include <fibril_synch.h>
    5049#include <adt/list.h>
    5150#include <as.h>
     
    253252int vfs_grab_phone(fs_handle_t handle)
    254253{
    255         link_t *cur;
    256         fs_info_t *fs;
    257254        int phone;
    258255
     
    265262         */
    266263        fibril_mutex_lock(&fs_head_lock);
     264        link_t *cur;
     265        fs_info_t *fs;
    267266        for (cur = fs_head.next; cur != &fs_head; cur = cur->next) {
    268267                fs = list_get_instance(cur, fs_info_t, fs_link);
     
    270269                        fibril_mutex_unlock(&fs_head_lock);
    271270                        fibril_mutex_lock(&fs->phone_lock);
    272                         phone = async_relation_create(fs->phone);
     271                        phone = ipc_connect_me_to(fs->phone, 0, 0, 0);
    273272                        fibril_mutex_unlock(&fs->phone_lock);
    274273
     
    285284 * @param phone         Phone to FS task.
    286285 */
    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);
     286void vfs_release_phone(int phone)
     287{
     288        /* TODO: implement connection caching */
     289        ipc_hangup(phone);
    306290}
    307291
Note: See TracChangeset for help on using the changeset viewer.