Changeset 9413c0d in mainline for uspace/srv/vfs/vfs_rdwr.c
- Timestamp:
- 2008-01-06T12:50:51Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b3c38750
- Parents:
- f57f8ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_rdwr.c
rf57f8ea r9413c0d 40 40 #include <async.h> 41 41 #include <errno.h> 42 #include < futex.h>42 #include <rwlock.h> 43 43 44 44 static void vfs_rdwr(ipc_callid_t rid, ipc_call_t *request, bool read) … … 86 86 * the same time. 87 87 */ 88 futex_down(&file->node->contents_futex); 88 if (read) 89 rwlock_reader_lock(&file->node->contents_rwlock); 90 else 91 rwlock_writer_lock(&file->node->contents_rwlock); 89 92 90 93 int fs_phone = vfs_grab_phone(file->node->fs_handle); … … 118 121 * Unlock the VFS node. 119 122 */ 120 futex_up(&file->node->contents_futex); 123 if (read) 124 rwlock_reader_unlock(&file->node->contents_rwlock); 125 else 126 rwlock_writer_unlock(&file->node->contents_rwlock); 121 127 122 128 /*
Note:
See TracChangeset
for help on using the changeset viewer.