Changeset e2ab36f1 in mainline for uspace/srv/vfs


Ignore:
Timestamp:
2011-08-19T12:38:09Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36b16bc, 9247c02c
Parents:
903bac0a
Message:

Track client data by client task ID instead of client task hash.

Location:
uspace/srv/vfs
Files:
3 edited

Legend:

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

    r903bac0a re2ab36f1  
    3636 */
    3737
     38#include <vfs/vfs.h>
    3839#include <ipc/services.h>
    3940#include <abi/ipc/event.h>
     
    4748#include <as.h>
    4849#include <atomic.h>
    49 #include <vfs/vfs.h>
     50#include <macros.h>
    5051#include "vfs.h"
    5152
     
    143144        case VFS_TASK_STATE_CHANGE:
    144145                if (IPC_GET_ARG1(*call) == VFS_PASS_HANDLE)
    145                         vfs_pass_handle(IPC_GET_ARG4(*call),
    146                             IPC_GET_ARG5(*call), (int) IPC_GET_ARG2(*call));
     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));
    147150                break;
    148151        default:
  • uspace/srv/vfs/vfs.h

    r903bac0a re2ab36f1  
    4141#include <bool.h>
    4242#include <ipc/vfs.h>
     43#include <task.h>
    4344
    4445#ifndef dprintf
     
    188189extern void vfs_client_data_destroy(void *);
    189190
    190 extern void vfs_pass_handle(sysarg_t, sysarg_t, int);
     191extern void vfs_pass_handle(task_id_t, task_id_t, int);
    191192extern int vfs_wait_handle_internal(void);
    192193
  • uspace/srv/vfs/vfs_file.c

    r903bac0a re2ab36f1  
    4444#include <fibril_synch.h>
    4545#include <adt/list.h>
     46#include <task.h>
    4647#include "vfs.h"
    4748
     
    346347}
    347348
    348 void vfs_pass_handle(sysarg_t donor_hash, sysarg_t acceptor_hash, int donor_fd)
     349void vfs_pass_handle(task_id_t donor_id, task_id_t acceptor_id, int donor_fd)
    349350{
    350351        vfs_client_data_t *donor_data = NULL;
     
    355356        int acceptor_fd;
    356357
    357         acceptor_data = async_get_client_data_by_hash(acceptor_hash);
     358        acceptor_data = async_get_client_data_by_id(acceptor_id);
    358359        if (!acceptor_data)
    359360                return;
     
    365366        bh->handle = -1;
    366367
    367         donor_data = async_get_client_data_by_hash(donor_hash);
     368        donor_data = async_get_client_data_by_id(donor_id);
    368369        if (!donor_data)
    369370                goto out;
     
    402403
    403404        if (donor_data)
    404                 async_put_client_data_by_hash(donor_hash);
     405                async_put_client_data_by_id(donor_id);
    405406        if (acceptor_data)
    406                 async_put_client_data_by_hash(acceptor_hash);
     407                async_put_client_data_by_id(acceptor_id);
    407408        if (donor_file)
    408409                _vfs_file_put(donor_data, donor_file);
Note: See TracChangeset for help on using the changeset viewer.