VirtualBox

Changeset 37211 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 25, 2011 11:37:52 AM (14 years ago)
Author:
vboxsync
Message:

Some ASMAtomic*Size elimiation.

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r37175 r37211  
    21892189{
    21902190    VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
    2191     AssertCompile(sizeof(pThis->mouseXAbs) == sizeof(*pAbsX));
    2192     AssertCompile(sizeof(pThis->mouseYAbs) == sizeof(*pAbsY));
    21932191    if (pAbsX)
    2194         ASMAtomicReadSize(&pThis->mouseXAbs, pAbsX);
     2192        *pAbsX = ASMAtomicReadS32(&pThis->mouseXAbs); /* why the atomic read? */
    21952193    if (pAbsY)
    2196         ASMAtomicReadSize(&pThis->mouseYAbs, pAbsY);
     2194        *pAbsY = ASMAtomicReadS32(&pThis->mouseYAbs);
    21972195    return VINF_SUCCESS;
    21982196}
     
    22102208    PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
    22112209
    2212     if ((pThis->mouseXAbs == absX) && (pThis->mouseYAbs == absY))
     2210    if (pThis->mouseXAbs == absX && pThis->mouseYAbs == absY)
    22132211    {
    22142212        PDMCritSectLeave(&pThis->CritSect);
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r37067 r37211  
    51405140    if (enmEvent == RTMPEVENT_OFFLINE)
    51415141    {
    5142         RTCPUID idGipMaster;
    5143         ASMAtomicReadSize(&pDevExt->idGipMaster, &idGipMaster);
     5142        RTCPUID idGipMaster = ASMAtomicReadU32(&pDevExt->idGipMaster);
    51445143        if (idGipMaster == idCpu)
    51455144        {
  • trunk/src/VBox/Runtime/r0drv/mpnotification-r0drv.c

    r36555 r37211  
    305305    /* pick up the list and the spinlock. */
    306306    RTSpinlockAcquire(hSpinlock, &Tmp);
    307     ASMAtomicWriteSize(&g_hRTMpNotifySpinLock, NIL_RTSPINLOCK);
     307    ASMAtomicWriteHandle(&g_hRTMpNotifySpinLock, NIL_RTSPINLOCK);
    308308    pHead = g_pRTMpCallbackHead;
    309309    g_pRTMpCallbackHead = NULL;
  • trunk/src/VBox/Runtime/r0drv/powernotification-r0drv.c

    r36555 r37211  
    301301    /* pick up the list and the spinlock. */
    302302    RTSpinlockAcquire(hSpinlock, &Tmp);
    303     ASMAtomicWriteSize(&g_hRTPowerNotifySpinLock, NIL_RTSPINLOCK);
     303    ASMAtomicWriteHandle(&g_hRTPowerNotifySpinLock, NIL_RTSPINLOCK);
    304304    pHead = g_pRTPowerCallbackHead;
    305305    g_pRTPowerCallbackHead = NULL;
  • trunk/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp

    r33540 r37211  
    175175     * Invalidate the semaphore and wake up anyone waiting on it.
    176176     */
    177     ASMAtomicWriteSize(&pThis->u32Magic, RTSEMEVENTMULTI_MAGIC + 1);
     177    ASMAtomicWriteU32(&pThis->u32Magic, RTSEMEVENTMULTI_MAGIC + 1);
    178178    if (ASMAtomicXchgS32(&pThis->iState, -1) == 1)
    179179    {
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r36768 r37211  
    25282528        for (PVMREQ pReq = pReqHead; pReq; pReq = pReq->pNext)
    25292529        {
    2530             ASMAtomicUoWriteSize(&pReq->iStatus, VERR_INTERNAL_ERROR);
     2530            ASMAtomicUoWriteS32(&pReq->iStatus, VERR_INTERNAL_ERROR);
    25312531            ASMAtomicWriteSize(&pReq->enmState, VMREQSTATE_INVALID);
    25322532            RTSemEventSignal(pReq->EventSem);
     
    25532553            for (PVMREQ pReq = pReqHead; pReq; pReq = pReq->pNext)
    25542554            {
    2555                 ASMAtomicUoWriteSize(&pReq->iStatus, VERR_INTERNAL_ERROR);
     2555                ASMAtomicUoWriteS32(&pReq->iStatus, VERR_INTERNAL_ERROR);
    25562556                ASMAtomicWriteSize(&pReq->enmState, VMREQSTATE_INVALID);
    25572557                RTSemEventSignal(pReq->EventSem);
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