VirtualBox

Changeset 25836 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jan 14, 2010 4:44:46 PM (15 years ago)
Author:
vboxsync
Message:

Main: locking order fixes; GUI comes up now with strict locking enabled

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r25834 r25836  
    152152    Data()
    153153#ifdef VBOX_WITH_USB
    154         : usbListsLock(LOCKCLASS_HOSTLIST)
     154        : usbListsLock(LOCKCLASS_USBLIST)
    155155#endif
    156156    {};
  • trunk/src/VBox/Main/MediumImpl.cpp

    r25443 r25836  
    16571657        if (FAILED(autoCaller.rc())) return autoCaller.rc();
    16581658
    1659         AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    1660 
    16611659        /* we access mParent */
    16621660        AutoReadLock treeLock(m->pVirtualBox->hardDiskTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
     1661
     1662        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    16631663
    16641664        if (m->pParent.isNull())
     
    30083008    AssertComRCReturn(autoCaller.rc(), false);
    30093009
    3010     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    3011 
    30123010    /* we access children */
    30133011    AutoReadLock treeLock(m->pVirtualBox->hardDiskTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
     3012
     3013    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    30143014
    30153015    switch (m->type)
  • trunk/src/VBox/Main/glue/AutoLock.cpp

    r25834 r25836  
    7474        { LOCKCLASS_USBPROXYSERVICE,  "3-USBPROXYSERVICE" },
    7575        { LOCKCLASS_HOSTOBJECT,       "4-HOSTOBJECT" },
    76         { LOCKCLASS_HOSTLIST,         "5-HOSTLIST" },
    77         { LOCKCLASS_OTHEROBJECT,      "6-OTHEROBJECT" },
    78         { LOCKCLASS_OTHERLIST,        "7-OTHERLIST" },
    79         { LOCKCLASS_OBJECTSTATE,      "8-OBJECTSTATE" }
     76        { LOCKCLASS_OTHEROBJECT,      "5-OTHEROBJECT" },
     77        { LOCKCLASS_OTHERLIST,        "6-OTHERLIST" },
     78        { LOCKCLASS_SNAPSHOTOBJECT,   "7-SNAPSHOTOBJECT" },
     79        { LOCKCLASS_USBLIST,          "8-USBLIST" },
     80        { LOCKCLASS_OBJECTSTATE,      "9-OBJECTSTATE" }
    8081    };
    8182
  • trunk/src/VBox/Main/include/SnapshotImpl.h

    r25834 r25836  
    9191    // public methods only for internal purposes
    9292
    93 
    9493    /**
    9594     * Simple run-time type identification without having to enable C++ RTTI.
     
    10099    {
    101100        return clsidSnapshot;
     101    }
     102
     103    /**
     104     * Override of the default locking class to be used for validating lock
     105     * order with the standard member lock handle.
     106     */
     107    virtual VBoxLockingClass getLockingClass() const
     108    {
     109        return LOCKCLASS_SNAPSHOTOBJECT;
    102110    }
    103111
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