VirtualBox

Changeset 64650 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Nov 11, 2016 2:55:07 PM (8 years ago)
Author:
vboxsync
Message:

bugref:8614: Additions/common/VBoxVideo: make the code more self-contained: my last attempt at removing all assertions from debug versions of the Linux video driver was not correct: I missed some places, and forgot that LINUX_VERSION_CODE is only defined when Linux headers are included. Hopefully fix that.

Location:
trunk/src/VBox/Additions/common/VBoxVideo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp

    r64337 r64650  
    4444    HGSMIBUFFERHEADER *pHdr = HGSMIBufferHeaderFromData(pvMem);
    4545    HGSMIOFFSET offMem = HGSMIPointerToOffset(&pCtx->areaCtx, pHdr);
    46     Assert(offMem != HGSMIOFFSET_VOID);
     46    VBVOAssert(offMem != HGSMIOFFSET_VOID);
    4747    if(offMem != HGSMIOFFSET_VOID)
    4848    {
     
    5757{
    5858    int rc = HGSMIBufferProcess(&pCtx->areaCtx, &pCtx->channels, offBuffer);
    59     Assert(!RT_FAILURE(rc));
     59    VBVOAssert(!RT_FAILURE(rc));
    6060    if(RT_FAILURE(rc))
    6161    {
     
    7878{
    7979    HGSMIOFFSET offset = hgsmiGetHostBuffer(pCtx);
    80     AssertReturnVoid(offset != HGSMIOFFSET_VOID);
     80    VBVOAssertReturnVoid(offset != HGSMIOFFSET_VOID);
    8181    hgsmiHostCmdProcess(pCtx, offset);
    8282}
     
    162162    HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer);
    163163
    164     Assert(offBuffer != HGSMIOFFSET_VOID);
     164    VBVOAssert(offBuffer != HGSMIOFFSET_VOID);
    165165    if (offBuffer != HGSMIOFFSET_VOID)
    166166    {
     
    242242        if (RT_SUCCESS(rc))
    243243        {
    244             AssertRC(pCaps->rc);
     244            VBVOAssertRC(pCaps->rc);
    245245            rc = pCaps->rc;
    246246        }
     
    318318                                             uint32_t *poffHostFlags)
    319319{
    320     AssertPtrNullReturnVoid(poffVRAMBaseMapping);
    321     AssertPtrNullReturnVoid(pcbMapping);
    322     AssertPtrNullReturnVoid(poffGuestHeapMemory);
    323     AssertPtrNullReturnVoid(pcbGuestHeapMemory);
    324     AssertPtrNullReturnVoid(poffHostFlags);
     320    VBVOAssertPtrNullReturnVoid(poffVRAMBaseMapping);
     321    VBVOAssertPtrNullReturnVoid(pcbMapping);
     322    VBVOAssertPtrNullReturnVoid(poffGuestHeapMemory);
     323    VBVOAssertPtrNullReturnVoid(pcbGuestHeapMemory);
     324    VBVOAssertPtrNullReturnVoid(poffHostFlags);
    325325    if (poffVRAMBaseMapping)
    326326        *poffVRAMBaseMapping = cbVRAM - VBVA_ADAPTER_INFORMATION_SIZE;
     
    386386    uint32_t offVRAMHostArea = offVRAMBaseMapping, cbHostArea = 0;
    387387
    388     AssertPtrReturnVoid(poffVRAMHostArea);
    389     AssertPtrReturnVoid(pcbHostArea);
     388    VBVOAssertPtrReturnVoid(poffVRAMHostArea);
     389    VBVOAssertPtrReturnVoid(pcbHostArea);
    390390    VBoxQueryConfHGSMI(pCtx, VBOX_VBVA_CONF32_HOST_HEAP_SIZE, &cbHostArea);
    391391    if (cbHostArea != 0)
     
    464464     * host heap is ready */
    465465    int rc = vboxHGSMIReportFlagsLocation(pCtx, offVRAMFlagsLocation);
    466     AssertRC(rc);
     466    VBVOAssertRC(rc);
    467467    if (RT_SUCCESS(rc) && fCaps)
    468468    {
    469469        /* Inform about caps */
    470470        rc = vboxHGSMISendCapsInfo(pCtx, fCaps);
    471         AssertRC(rc);
     471        VBVOAssertRC(rc);
    472472    }
    473473    if (RT_SUCCESS (rc))
     
    475475        /* Report the host heap location. */
    476476        rc = vboxHGSMIReportHostArea(pCtx, offVRAMHostArea, cbHostArea);
    477         AssertRC(rc);
     477        VBVOAssertRC(rc);
    478478    }
    479479    // Log(("VBoxVideo::vboxSetupAdapterInfo finished rc = %d\n", rc));
  • trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp

    r64425 r64650  
    2323#ifndef VBOX_GUESTR3XF86MOD
    2424# include <iprt/string.h>
    25 #endif
    26 
    27 #ifndef LINUX_VERSION_CODE
    28 # define VBVOAssertPtr AssertPtr
    29 #else
    30 # define VBVOAssertPtr(a) do {} while(0)
    3125#endif
    3226
  • trunk/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp

    r64425 r64650  
    2121#include <VBox/err.h>
    2222// #include <VBox/log.h>
    23 #ifndef LINUX_VERSION_CODE
    24 # include <iprt/assert.h>
    25 # define VBVOAssert Assert
    26 #else
    27 # define VBVOAssert(a) do {} while(0)
    28 #endif
    2923#include <iprt/string.h>
    3024
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