Changeset 37596 in vbox for trunk/src/VBox/Runtime/r3/posix/filelock-posix.cpp
- Timestamp:
- Jun 22, 2011 7:30:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/filelock-posix.cpp
r28800 r37596 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 50 50 51 51 52 RTR3DECL(int) RTFileLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock)52 RTR3DECL(int) RTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) 53 53 { 54 54 Assert(offLock >= 0); … … 83 83 84 84 Assert(RTFILE_LOCK_WAIT); 85 if (fcntl( File, (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0)85 if (fcntl(RTFileToNative(hFile), (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0) 86 86 return VINF_SUCCESS; 87 87 … … 95 95 96 96 97 RTR3DECL(int) RTFileChangeLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock)97 RTR3DECL(int) RTFileChangeLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock) 98 98 { 99 99 /** @todo We never returns VERR_FILE_NOT_LOCKED for now. */ 100 return RTFileLock( File, fLock, offLock, cbLock);100 return RTFileLock(hFile, fLock, offLock, cbLock); 101 101 } 102 102 103 103 104 RTR3DECL(int) RTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock)104 RTR3DECL(int) RTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock) 105 105 { 106 106 Assert(offLock >= 0); … … 126 126 fl.l_pid = 0; 127 127 128 if (fcntl( File, F_SETLK, &fl) >= 0)128 if (fcntl(RTFileToNative(hFile), F_SETLK, &fl) >= 0) 129 129 return VINF_SUCCESS; 130 130
Note:
See TracChangeset
for help on using the changeset viewer.