VirtualBox

Changeset 30111 in vbox for trunk/src/VBox/Runtime/r3/win


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

iprt/asm.h,*: Revised the ASMAtomic*Ptr functions and macros. The new saves lots of unsafe (void * volatile *) casts as well as adding some type safety when using GCC (typeof rulez).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/semmutex-win.cpp

    r28800 r30111  
    138138    AssertReturn(ASMAtomicCmpXchgU32(&pThis->u32Magic, RTSEMMUTEX_MAGIC_DEAD, RTSEMMUTEX_MAGIC), VERR_INVALID_HANDLE);
    139139    HANDLE hMtx = pThis->hMtx;
    140     ASMAtomicWritePtr((void * volatile *)&pThis->hMtx, (void *)INVALID_HANDLE_VALUE);
     140    ASMAtomicWritePtr(&pThis->hMtx, INVALID_HANDLE_VALUE);
    141141
    142142    int rc = VINF_SUCCESS;
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