VirtualBox

Ignore:
Timestamp:
Jun 9, 2010 12:31:50 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62507
Message:

iprt/asm.h,*: Added ASMAtomicWriteNullPtr and ASMAtomicUoWriteNullPtr to better deal with NULL being 0 in C++.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r30111 r30112  
    508508        if (g_pSUPGlobalInfoPage)
    509509        {
    510             ASMAtomicWritePtr((void * volatile *)&g_pSUPGlobalInfoPage, NULL);
    511             ASMAtomicWritePtr((void * volatile *)&g_pSUPGlobalInfoPageR0, NULL);
     510            ASMAtomicWriteNullPtr((void * volatile *)&g_pSUPGlobalInfoPage);
     511            ASMAtomicWriteNullPtr((void * volatile *)&g_pSUPGlobalInfoPageR0);
    512512            ASMAtomicWriteSize(&g_HCPhysSUPGlobalInfoPage, NIL_RTHCPHYS);
    513513            /* just a little safe guard against threads using the page. */
  • trunk/src/VBox/HostDrivers/Support/SUPSvcGrant.cpp

    r30111 r30112  
    975975    unsigned cSessions = 0;
    976976    for (PSUPSVCGRANTSESSION pCur = pThis->pSessionHead; pCur; pCur = pCur->pNext)
    977         ASMAtomicWritePtr(&pCur->pParent, NULL);
     977        ASMAtomicWriteNullPtr(&pCur->pParent);
    978978
    979979    RTCritSectLeave(&pThis->CritSect);
Note: See TracChangeset for help on using the changeset viewer.

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