Changeset 7992 in vbox for trunk/src/VBox/Main/include/VirtualBoxBase.h
- Timestamp:
- Apr 15, 2008 1:53:12 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29646
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/VirtualBoxBase.h
r6964 r7992 31 31 32 32 using namespace com; 33 using util::AutoLock; 34 using util::AutoReaderLock; 35 using util::AutoMultiLock; 33 using namespace util; 36 34 37 35 #include <iprt/cdefs.h> … … 438 436 : public CComObjectRootEx 439 437 #endif 440 , public AutoLock::Lockable438 , public Lockable 441 439 { 442 440 public: … … 452 450 453 451 // AutoLock::Lockable interface 454 virtual AutoLock::Handle *lockHandle() const;452 virtual RWLockHandle *lockHandle() const; 455 453 456 454 /** … … 863 861 }; 864 862 863 /** 864 * Returns a lock handle used to protect the primary state fields (used by 865 * #addCaller(), AutoInitSpan, AutoUninitSpan, etc.). Only intended to be 866 * used for similar purposes in subclasses. WARNING: NO any other locks may 867 * be requested while holding this lock! 868 */ 869 WriteLockHandle *stateLockHandle() { return &mStateLock; } 870 865 871 private: 866 872 … … 886 892 887 893 /** Protects access to state related data members */ 888 RTCRITSECTmStateLock;894 WriteLockHandle mStateLock; 889 895 890 896 /** User-level object lock for subclasses */ 891 mutable AutoLock::Handle *mObjectLock;897 mutable RWLockHandle *mObjectLock; 892 898 }; 893 899 … … 1619 1625 VirtualBoxBaseWithChildren() 1620 1626 : mUninitDoneSem (NIL_RTSEMEVENT), mChildrenLeft (0) 1621 { 1622 RTCritSectInit (&mMapLock); 1623 } 1627 {} 1624 1628 1625 1629 virtual ~VirtualBoxBaseWithChildren() 1626 { 1627 RTCritSectDelete (&mMapLock); 1628 } 1630 {} 1629 1631 1630 1632 /** … … 1680 1682 DependentChildren mDependentChildren; 1681 1683 1682 RTCRITSECT mMapLock; 1684 WriteLockHandle mMapLock; 1685 1683 1686 RTSEMEVENT mUninitDoneSem; 1684 1687 unsigned mChildrenLeft; … … 1825 1828 1826 1829 /* Protects all the fields above */ 1827 AutoLock::Handle mMapLock;1830 RWLockHandle mMapLock; 1828 1831 }; 1829 1832 … … 1907 1910 * </code> 1908 1911 */ 1909 AutoLock::Handle &dependentChildrenLock() const { returnmMapLock; }1912 RWLockHandle *dependentChildrenLock() const { return &mMapLock; } 1910 1913 1911 1914 /** … … 1975 1978 1976 1979 bool mInUninit; 1977 mutable AutoLock::Handle mMapLock;1980 mutable RWLockHandle mMapLock; 1978 1981 }; 1979 1982 … … 2063 2066 * </code> 2064 2067 */ 2065 AutoLock::Handle &dependentChildrenLock() const { returnmMapLock; }2068 RWLockHandle *dependentChildrenLock() const { return &mMapLock; } 2066 2069 2067 2070 /** … … 2097 2100 2098 2101 /* Protects the two fields above */ 2099 mutable AutoLock::Handle mMapLock;2102 mutable RWLockHandle mMapLock; 2100 2103 }; 2101 2104
Note:
See TracChangeset
for help on using the changeset viewer.