Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2678 → Rev 2679

/trunk/uspace/srv/vfs/vfs_rdwr.c
39,6 → 39,7
#include <ipc/ipc.h>
#include <async.h>
#include <errno.h>
#include <futex.h>
 
static void vfs_rdwr(ipc_callid_t rid, ipc_call_t *request, bool read)
{
80,6 → 81,12
return;
}
 
/*
* Lock the file's node so that no other client can read/write to it at
* the same time.
*/
futex_down(&file->node->contents_futex);
 
int fs_phone = vfs_grab_phone(file->node->fs_handle);
/*
108,6 → 115,11
size_t bytes = IPC_GET_ARG1(answer);
 
/*
* Unlock the VFS node.
*/
futex_up(&file->node->contents_futex);
 
/*
* Update the position pointer.
*/
file->pos += bytes;