VirtualBox

Changeset 20889 in vbox


Ignore:
Timestamp:
Jun 24, 2009 12:06:59 PM (15 years ago)
Author:
vboxsync
Message:

PDM queue locking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDMQueue.cpp

    r20088 r20889  
    144144         * Insert into the queue list for timer driven queues.
    145145         */
     146        pdmLock(pVM);
    146147        pQueue->pNext = pVM->pdm.s.pQueuesTimer;
    147148        pVM->pdm.s.pQueuesTimer = pQueue;
     149        pdmUnlock(pVM);
    148150    }
    149151    else
     
    159161         *   problem any longer. The priority might be a nice feature for later though.
    160162         */
     163        pdmLock(pVM);
    161164        if (!pVM->pdm.s.pQueuesForced)
    162165            pVM->pdm.s.pQueuesForced = pQueue;
     
    168171            pPrev->pNext = pQueue;
    169172        }
     173        pdmUnlock(pVM);
    170174    }
    171175
     
    387391    Assert(pQueue && pQueue->pVMR3);
    388392    PVM pVM = pQueue->pVMR3;
    389     VMCPU_ASSERT_EMT(&pVM->aCpus[0]);
     393
     394    pdmLock(pVM);
    390395
    391396    /*
     
    432437    pQueue->pNext = NULL;
    433438    pQueue->pVMR3 = NULL;
     439    pdmUnlock(pVM);
    434440
    435441    /*
     
    471477    if (!pDevIns)
    472478        return VERR_INVALID_PARAMETER;
    473     VMCPU_ASSERT_EMT(&pVM->aCpus[0]);
     479
     480    pdmLock(pVM);
    474481
    475482    /*
     
    499506    } while (pQueue);
    500507
     508    pdmUnlock(pVM);
    501509    return VINF_SUCCESS;
    502510}
     
    520528    if (!pDrvIns)
    521529        return VERR_INVALID_PARAMETER;
    522     VMCPU_ASSERT_EMT(&pVM->aCpus[0]); /** @todo fix this using the "Misc" critical section. */
     530
     531    pdmLock(pVM);
    523532
    524533    /*
     
    548557    } while (pQueue);
    549558
     559    pdmUnlock(pVM);
    550560    return VINF_SUCCESS;
    551561}
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