VirtualBox

Changeset 5219 in vbox


Ignore:
Timestamp:
Oct 10, 2007 2:14:15 PM (17 years ago)
Author:
vboxsync
Message:

HaltEvent -> HaltEventMulti

Location:
trunk/src/VBox/VMM/VMMR0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp

    r5211 r5219  
    476476    pGVM->gvmm.s.VMPagesMemObj = NIL_RTR0MEMOBJ;
    477477    pGVM->gvmm.s.VMPagesMapObj = NIL_RTR0MEMOBJ;
    478     pGVM->gvmm.s.HaltEvent = NIL_RTSEMEVENT;
     478    pGVM->gvmm.s.HaltEventMulti = NIL_RTSEMEVENTMULTI;
    479479}
    480480
     
    559559    if (RT_SUCCESS(rc))
    560560    {
    561         if (pGVM->gvmm.s.HaltEvent == NIL_RTSEMEVENT)
    562         {
    563             rc = RTSemEventCreate(&pGVM->gvmm.s.HaltEvent);
     561        if (pGVM->gvmm.s.HaltEventMulti == NIL_RTSEMEVENTMULTI)
     562        {
     563            rc = RTSemEventMultiCreate(&pGVM->gvmm.s.HaltEventMulti);
    564564            if (RT_FAILURE(rc))
    565                 pGVM->gvmm.s.HaltEvent = NIL_RTSEMEVENT;
     565                pGVM->gvmm.s.HaltEventMulti = NIL_RTSEMEVENTMULTI;
    566566        }
    567567        else
     
    11291129                {
    11301130                    ASMAtomicXchgU64(&pCurGVM->gvmm.s.u64HaltExpire, 0);
    1131                     int rc = RTSemEventSignal(pCurGVM->gvmm.s.HaltEvent);
     1131                    int rc = RTSemEventMultiSignal(pCurGVM->gvmm.s.HaltEventMulti);
    11321132                    AssertRC(rc);
    11331133                    cWoken++;
     
    11581158            {
    11591159                ASMAtomicXchgU64(&pCurGVM->gvmm.s.u64HaltExpire, 0);
    1160                 int rc = RTSemEventSignal(pCurGVM->gvmm.s.HaltEvent);
     1160                int rc = RTSemEventMultiSignal(pCurGVM->gvmm.s.HaltEventMulti);
    11611161                AssertRC(rc);
    11621162                cWoken++;
     
    11771177            {
    11781178                ASMAtomicXchgU64(&pCurGVM->gvmm.s.u64HaltExpire, 0);
    1179                 int rc = RTSemEventSignal(pCurGVM->gvmm.s.HaltEvent);
     1179                int rc = RTSemEventMultiSignal(pCurGVM->gvmm.s.HaltEventMulti);
    11801180                AssertRC(rc);
    11811181                cWoken++;
     
    12391239
    12401240        uint32_t cMillies = (u64ExpireGipTime - u64Now) / 1000000;
    1241         rc = RTSemEventWaitNoResume(pGVM->gvmm.s.HaltEvent, cMillies ? cMillies : 1);
     1241        rc = RTSemEventMultiWaitNoResume(pGVM->gvmm.s.HaltEventMulti, cMillies ? cMillies : 1);
    12421242        ASMAtomicXchgU64(&pGVM->gvmm.s.u64HaltExpire, 0);
    12431243        if (rc == VERR_TIMEOUT)
     
    12521252        RTSemFastMutexRelease(pGVMM->UsedLock);
    12531253    }
     1254
     1255    /* Make sure false wake up calls (gvmmR0SchedDoWakeUps) cause us to spin. */
     1256    RTSemEventMultiReset(pGVM->gvmm.s.HaltEventMulti);
    12541257
    12551258    return rc;
     
    12961299        }
    12971300
    1298         int rc2 = RTSemEventSignal(pGVM->gvmm.s.HaltEvent);
     1301        int rc2 = RTSemEventMultiSignal(pGVM->gvmm.s.HaltEventMulti);
    12991302        AssertRC(rc2);
    13001303
  • trunk/src/VBox/VMM/VMMR0/GVMMR0Internal.h

    r5211 r5219  
    4040    uint64_t volatile   u64HaltExpire;
    4141    /** The event semaphore the EMT thread is blocking on. */
    42     RTSEMEVENT          HaltEvent;
     42    RTSEMEVENTMULTI     HaltEventMulti;
    4343    /** The APIC ID of the CPU that EMT was scheduled on the last time we checked. */
    4444    uint8_t             iCpuEmt;
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