Changeset 67721 in vbox for trunk/include/VBox/com
- Timestamp:
- Jun 30, 2017 10:17:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/AutoLock.h
r63147 r67721 125 125 126 126 /** 127 * Returns @c true if the current thread holds a read lock on this 128 * read/write semaphore. Intended for debugging only as it isn't always 129 * accurate given @a fWannaHear. 130 */ 131 virtual bool isReadLockedOnCurrentThread(bool fWannaHear = true) const = 0; 132 133 /** 127 134 * Returns the current write lock level of this semaphore. The lock level 128 135 * determines the number of nested #lockWrite() calls on the given … … 164 171 165 172 virtual bool isWriteLockOnCurrentThread() const; 173 virtual bool isReadLockedOnCurrentThread(bool fWannaHear = true) const; 166 174 167 175 virtual void lockWrite(LOCKVAL_SRC_POS_DECL); … … 202 210 virtual ~WriteLockHandle(); 203 211 virtual bool isWriteLockOnCurrentThread() const; 212 virtual bool isReadLockedOnCurrentThread(bool fWannaHear = true) const; 204 213 205 214 virtual void lockWrite(LOCKVAL_SRC_POS_DECL); … … 254 263 LockHandle *h = lockHandle(); 255 264 return h ? h->isWriteLockOnCurrentThread() : false; 265 } 266 267 /** 268 * Equivalent to <tt>#lockHandle()->isReadLockedOnCurrentThread()</tt>. 269 * Returns @c false if lockHandle() returns @c NULL. 270 * @note Use with care, simple debug assertions and similar only. 271 */ 272 bool isReadLockedOnCurrentThread(bool fWannaHear = true) 273 { 274 LockHandle *h = lockHandle(); 275 return h ? h->isReadLockedOnCurrentThread(fWannaHear) : false; 256 276 } 257 277 }; … … 573 593 bool isWriteLockOnCurrentThread() const; 574 594 uint32_t writeLockLevel() const; 595 596 bool isReadLockedOnCurrentThread(bool fWannaHear = true) const; 575 597 576 598 private:
Note:
See TracChangeset
for help on using the changeset viewer.