VirtualBox

Ignore:
Timestamp:
Oct 4, 2008 10:17:38 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37416
Message:

#1865: PDMCritSect.

File:
1 edited

Legend:

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

    r9154 r12983  
    11/* $Id$ */
    22/** @file
    3  * PDM Critical Sections
     3 * PDM - Critical Sections, Ring-3.
    44 */
    55
     
    1919 * additional information or have any questions.
    2020 */
    21 
    2221
    2322
     
    7170         pCur;
    7271         pCur = pCur->pNext)
    73         pCur->pVMGC = pVM->pVMGC;
     72        pCur->pVMRC = pVM->pVMRC;
    7473}
    7574
     
    117116        pCritSect->pVMR3 = pVM;
    118117        pCritSect->pVMR0 = (RTR0PTR)pVM;//pVM->pVMR0;
    119         pCritSect->pVMGC = pVM->pVMGC;
     118        pCritSect->pVMRC = pVM->pVMRC;
    120119        pCritSect->pvKey = pvKey;
    121120        pCritSect->EventToSignal = NIL_RTSEMEVENT;
     
    123122        pVM->pdm.s.pCritSects = pCritSect;
    124123#ifdef VBOX_WITH_STATISTICS
    125         STAMR3RegisterF(pVM, &pCritSect->StatContentionR0GCLock,   STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,          NULL, "/PDM/CritSects/%s/ContentionR0GCLock", pszName);
    126         STAMR3RegisterF(pVM, &pCritSect->StatContentionR0GCUnlock, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,          NULL, "/PDM/CritSects/%s/ContentionR0GCUnlock", pszName);
    127         STAMR3RegisterF(pVM, &pCritSect->StatContentionR3,         STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,          NULL, "/PDM/CritSects/%s/ContentionR3", pszName);
    128         STAMR3RegisterF(pVM, &pCritSect->StatLocked,           STAMTYPE_PROFILE_ADV, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_OCCURENCE, NULL, "/PDM/CritSects/%s/Locked", pszName);
     124        STAMR3RegisterF(pVM, &pCritSect->StatContentionRZLock,  STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,          NULL, "/PDM/CritSects/%s/ContentionRZLock", pszName);
     125        STAMR3RegisterF(pVM, &pCritSect->StatContentionRZUnlock,STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,          NULL, "/PDM/CritSects/%s/ContentionRZUnlock", pszName);
     126        STAMR3RegisterF(pVM, &pCritSect->StatContentionR3,      STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES,          NULL, "/PDM/CritSects/%s/ContentionR3", pszName);
     127        STAMR3RegisterF(pVM, &pCritSect->StatLocked,        STAMTYPE_PROFILE_ADV, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_OCCURENCE, NULL, "/PDM/CritSects/%s/Locked", pszName);
    129128#endif
    130129    }
     
    191190    /* delete */
    192191    pCritSect->pNext = NULL;
    193     pCritSect->pVMGC = 0;
     192    pCritSect->pvKey = NULL;
    194193    pCritSect->pVMR3 = NULL;
    195194    pCritSect->pVMR0 = NIL_RTR0PTR;
    196     pCritSect->pvKey = NULL;
     195    pCritSect->pVMRC = NIL_RTRCPTR;
    197196#ifdef VBOX_WITH_STATISTICS
    198197    if (!fFinal)
    199198    {
    200         STAMR3Deregister(pVM, &pCritSect->StatContentionR0GCLock);
    201         STAMR3Deregister(pVM, &pCritSect->StatContentionR0GCUnlock);
     199        STAMR3Deregister(pVM, &pCritSect->StatContentionRZLock);
     200        STAMR3Deregister(pVM, &pCritSect->StatContentionRZUnlock);
    202201        STAMR3Deregister(pVM, &pCritSect->StatContentionR3);
    203202        STAMR3Deregister(pVM, &pCritSect->StatLocked);
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