VirtualBox

Changeset 20060 in vbox


Ignore:
Timestamp:
May 27, 2009 9:38:46 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
47800
Message:

Atomic updates of lock counters

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMInternal.h

    r19903 r20060  
    3838#include <VBox/hwaccm.h>
    3939#include <iprt/avl.h>
     40#include <iprt/asm.h>
    4041#include <iprt/assert.h>
    4142#include <iprt/critsect.h>
     
    16441645     * It's a hack required because of REMR3NotifyHandlerPhysicalDeregister. */
    16451646    bool volatile       fReusedFlushPending;
     1647    bool                bPadding1;
     1648
    16461649    /** Used to indicate that this page can't be flushed. Important for cr3 root pages or shadow pae pd pages). */
    1647     uint8_t             cLocked;
     1650    uint32_t            cLocked;
    16481651} PGMPOOLPAGE, *PPGMPOOLPAGE, **PPPGMPOOLPAGE;
    16491652/** Pointer to a const pool page. */
     
    44454448DECLINLINE(void) pgmPoolLockPage(PPGMPOOL pPool, PPGMPOOLPAGE pPage)
    44464449{
    4447     pPage->cLocked++;
     4450    ASMAtomicIncU32(&pPage->cLocked);
    44484451}
    44494452
     
    44584461{
    44594462    Assert(pPage->cLocked);
    4460     pPage->cLocked--;
     4463    ASMAtomicDecU32(&pPage->cLocked);
    44614464}
    44624465
  • trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp

    r19733 r20060  
    673673    GEN_CHECK_OFF(PGMPOOLPAGE, fCached);
    674674    GEN_CHECK_OFF(PGMPOOLPAGE, fReusedFlushPending);
     675    GEN_CHECK_OFF(PGMPOOLPAGE, cLocked);
    675676    GEN_CHECK_SIZE(PGMPOOL);
    676677    GEN_CHECK_OFF(PGMPOOL, pVMR3);
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