VirtualBox

Changeset 25930 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jan 20, 2010 12:59:47 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56765
Message:

Main: remove separate snapshots tree lock, have snapshots list use machine lock instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/MachineImpl.h

    r25903 r25930  
    188188        ComObjPtr<Snapshot> mFirstSnapshot;
    189189        ComObjPtr<Snapshot> mCurrentSnapshot;
    190 
    191         // protectes the snapshots tree of this machine
    192         RWLockHandle mSnapshotsTreeLockHandle;
    193190    };
    194191
     
    800797    static const wchar_t *getComponentName() { return L"Machine"; }
    801798
    802     /**
    803      * Returns the handle of the snapshots tree lock. This lock is
    804      * machine-specific because there is one snapshots tree per
    805      * IMachine; the lock protects the "first snapshot" member in
    806      * IMachine and all the children and parent links in snapshot
    807      * objects pointed to therefrom.
    808      *
    809      * Locking order:
    810      * a) object lock of the machine;
    811      * b) snapshots tree lock of the machine;
    812      * c) individual snapshot object locks in parent->child order,
    813      *    if needed; they are _not_ needed for the tree itself
    814      *    (as defined above).
    815      */
    816     RWLockHandle* snapshotsTreeLockHandle() const
    817     {
    818         return &mData->mSnapshotsTreeLockHandle;
    819     }
    820 
    821799protected:
    822800
     
    932910    // so they cannot be a part of HWData
    933911
    934     const ComObjPtr<VRDPServer> mVRDPServer;
    935     const ComObjPtr<SerialPort>
    936         mSerialPorts [SchemaDefs::SerialPortCount];
    937     const ComObjPtr<ParallelPort>
    938         mParallelPorts [SchemaDefs::ParallelPortCount];
    939     const ComObjPtr<AudioAdapter> mAudioAdapter;
    940     const ComObjPtr<USBController> mUSBController;
    941     const ComObjPtr<BIOSSettings> mBIOSSettings;
    942     const ComObjPtr<NetworkAdapter>
    943         mNetworkAdapters [SchemaDefs::NetworkAdapterCount];
     912    const ComObjPtr<VRDPServer>     mVRDPServer;
     913    const ComObjPtr<SerialPort>     mSerialPorts[SchemaDefs::SerialPortCount];
     914    const ComObjPtr<ParallelPort>   mParallelPorts[SchemaDefs::ParallelPortCount];
     915    const ComObjPtr<AudioAdapter>   mAudioAdapter;
     916    const ComObjPtr<USBController>  mUSBController;
     917    const ComObjPtr<BIOSSettings>   mBIOSSettings;
     918    const ComObjPtr<NetworkAdapter> mNetworkAdapters[SchemaDefs::NetworkAdapterCount];
    944919
    945920    typedef std::list< ComObjPtr<StorageController> > StorageControllerList;
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