Changeset 55958 in vbox
- Timestamp:
- May 20, 2015 12:33:40 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/VirtualBoxBase.cpp
r55582 r55958 75 75 { 76 76 /* lazy initialization */ 77 if (RT_UNLIKELY(!mObjectLock)) 78 { 79 AssertCompile(sizeof(RWLockHandle *) == sizeof(void *)); 80 81 // getLockingClass() is overridden by many subclasses to return 82 // one of the locking classes listed at the top of AutoLock.h 83 RWLockHandle *objLock = new RWLockHandle(getLockingClass()); 84 if (!ASMAtomicCmpXchgPtr(&mObjectLock, objLock, NULL)) 85 { 86 delete objLock; 87 objLock = ASMAtomicReadPtrT(&mObjectLock, RWLockHandle *); 88 } 89 return objLock; 90 } 91 return mObjectLock; 77 if (RT_LIKELY(mObjectLock)) 78 return mObjectLock; 79 80 AssertCompile(sizeof(RWLockHandle *) == sizeof(void *)); 81 82 // getLockingClass() is overridden by many subclasses to return 83 // one of the locking classes listed at the top of AutoLock.h 84 RWLockHandle *objLock = new RWLockHandle(getLockingClass()); 85 if (!ASMAtomicCmpXchgPtr(&mObjectLock, objLock, NULL)) 86 { 87 delete objLock; 88 objLock = ASMAtomicReadPtrT(&mObjectLock, RWLockHandle *); 89 } 90 return objLock; 92 91 } 93 92
Note:
See TracChangeset
for help on using the changeset viewer.