Changeset 67721 in vbox for trunk/src/VBox/Main/glue
- Timestamp:
- Jun 30, 2017 10:17:01 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116569
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/AutoLock.cpp
r63147 r67721 230 230 } 231 231 232 /*virtual*/ bool RWLockHandle::isReadLockedOnCurrentThread(bool fWannaHear) const 233 { 234 #ifdef GLUE_USE_CRITSECTRW 235 return RTCritSectRwIsReadOwner(&m->CritSect, fWannaHear); 236 #else 237 return RTSemRWIsReadOwner(m->sem, fWannaHear); 238 #endif 239 } 240 232 241 /*virtual*/ void RWLockHandle::lockRead(LOCKVAL_SRC_POS_DECL) 233 242 { … … 327 336 RTCritSectEnter(&m->sem); 328 337 #endif 338 } 339 340 /*virtual*/ bool WriteLockHandle::isReadLockedOnCurrentThread(bool fWannaHear) const 341 { 342 RT_NOREF(fWannaHear); 343 return RTCritSectIsOwner(&m->sem); 329 344 } 330 345 … … 661 676 } 662 677 678 /** 679 * Returns @c true if the current thread holds a write lock on the managed 680 * read/write semaphore. Returns @c false if the managed semaphore is @c 681 * NULL. 682 * 683 * @note Intended for debugging only (esp. considering fWannaHear). 684 */ 685 bool AutoWriteLock::isReadLockedOnCurrentThread(bool fWannaHear) const 686 { 687 return m->aHandles[0] ? m->aHandles[0]->isReadLockedOnCurrentThread(fWannaHear) : false; 688 } 689 663 690 //////////////////////////////////////////////////////////////////////////////// 664 691 //
Note:
See TracChangeset
for help on using the changeset viewer.