VirtualBox

Ignore:
Timestamp:
Aug 10, 2007 12:35:04 PM (17 years ago)
Author:
vboxsync
Message:

Extended interface for locked pointers

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp

    r4107 r4111  
    167167            for (iParm = 0; iParm < pCallInfo->cParms; iParm++, pParm++)
    168168            {
     169                if (pParm->type == VMMDevHGCMParmType_LinAddr_Locked_In)
     170                    pParm->type = VMMDevHGCMParmType_LinAddr_In;
     171                else
     172                if (pParm->type == VMMDevHGCMParmType_LinAddr_Locked_Out)
     173                    pParm->type = VMMDevHGCMParmType_LinAddr_Out;
     174                else
     175                if (pParm->type == VMMDevHGCMParmType_LinAddr_Locked)
     176                    pParm->type = VMMDevHGCMParmType_LinAddr;
     177                else
    169178                if (   pParm->type == VMMDevHGCMParmType_LinAddr_In
    170179                    || pParm->type == VMMDevHGCMParmType_LinAddr_Out
  • trunk/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp

    r4071 r4111  
    5353// #define DUMPHEAP
    5454
    55 #ifdef DUMPHEAP
    56 #define VBGL_PH_dprintf(a) AssertMsg2 a
     55#if 1 //def DUMPHEAP
     56#define VBGL_PH_dprintf(a) RTLogBackdoorPrintf a
    5757#else
    5858#define VBGL_PH_dprintf(a)
     
    497497    }
    498498
     499    VBGL_PH_dprintf(("VbglPhysHeapGetPhysAddr %x -> %x\n", p, physAddr));
     500
    499501    return physAddr;
    500502}
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.c

    r4071 r4111  
    393393
    394394DECLVBGL(int) vboxCallRead(PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile,
    395                            uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer)
     395                           uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer, bool fLocked)
    396396{
    397397    int rc = VINF_SUCCESS;
     
    410410    data.cb.type                        = VMMDevHGCMParmType_32bit;
    411411    data.cb.u.value32                   = *pcbBuffer;
    412     data.buffer.type                    = VMMDevHGCMParmType_LinAddr_Out;
     412    data.buffer.type                    = (fLocked) ? VMMDevHGCMParmType_LinAddr_Locked_Out : VMMDevHGCMParmType_LinAddr_Out;
    413413    data.buffer.u.Pointer.size          = *pcbBuffer;
    414414    data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
     
    428428
    429429DECLVBGL(int) vboxCallWrite(PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile,
    430                             uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer)
     430                            uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer, bool fLocked)
    431431{
    432432    int rc = VINF_SUCCESS;
     
    445445    data.cb.type                        = VMMDevHGCMParmType_32bit;
    446446    data.cb.u.value32                   = *pcbBuffer;
    447     data.buffer.type                    = VMMDevHGCMParmType_LinAddr_In;
     447    data.buffer.type                    = (fLocked) ? VMMDevHGCMParmType_LinAddr_Locked_In : VMMDevHGCMParmType_LinAddr_In;
    448448    data.buffer.u.Pointer.size          = *pcbBuffer;
    449449    data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.h

    r4071 r4111  
    130130DECLVBGL(int) vboxCallFlush (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile);
    131131
    132 DECLVBGL(int) vboxCallRead (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer);
    133 DECLVBGL(int) vboxCallWrite (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer);
     132DECLVBGL(int) vboxCallRead (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer, bool fLocked);
     133DECLVBGL(int) vboxCallWrite (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint32_t *pcbBuffer, uint8_t *pBuffer, bool fLocked);
    134134
    135135DECLVBGL(int) vboxCallLock (PVBSFCLIENT pClient, PVBSFMAP pMap, SHFLHANDLE hFile, uint64_t offset, uint64_t cbSize, uint32_t fLock);
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