VirtualBox

Ignore:
Timestamp:
Jun 22, 2011 7:30:06 PM (13 years ago)
Author:
vboxsync
Message:

*: RTFILE becomes a pointer, RTFileOpen++ expands it's flags paramter from uint32_t to uint64_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/filelock-posix.cpp

    r28800 r37596  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2011 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5050
    5151
    52 RTR3DECL(int)  RTFileLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock)
     52RTR3DECL(int)  RTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock)
    5353{
    5454    Assert(offLock >= 0);
     
    8383
    8484    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)
    8686        return VINF_SUCCESS;
    8787
     
    9595
    9696
    97 RTR3DECL(int)  RTFileChangeLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock)
     97RTR3DECL(int)  RTFileChangeLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock)
    9898{
    9999    /** @todo We never returns VERR_FILE_NOT_LOCKED for now. */
    100     return RTFileLock(File, fLock, offLock, cbLock);
     100    return RTFileLock(hFile, fLock, offLock, cbLock);
    101101}
    102102
    103103
    104 RTR3DECL(int)  RTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock)
     104RTR3DECL(int)  RTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock)
    105105{
    106106    Assert(offLock >= 0);
     
    126126    fl.l_pid    = 0;
    127127
    128     if (fcntl(File, F_SETLK, &fl) >= 0)
     128    if (fcntl(RTFileToNative(hFile), F_SETLK, &fl) >= 0)
    129129        return VINF_SUCCESS;
    130130
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette