Lines Matching defs:ReaderWriterMutex
204 // A ReaderWriterMutex is used to achieve mutual exclusion between threads, similar to a Mutex.
205 // Unlike a Mutex a ReaderWriterMutex can be used to gain exclusive (writer) or shared (reader)
207 // condition variable. A ReaderWriterMutex can be in one of three states:
220 std::ostream& operator<<(std::ostream& os, const ReaderWriterMutex& mu);
221 class LOCKABLE ReaderWriterMutex : public BaseMutex {
223 explicit ReaderWriterMutex(const char* name, LockLevel level = kDefaultMutexLevel);
224 ~ReaderWriterMutex();
228 // Block until ReaderWriterMutex is free then acquire exclusive access.
236 // Block until ReaderWriterMutex is free and acquire exclusive access. Returns true on success
243 // Block until ReaderWriterMutex is shared or free then acquire a share on the access.
247 // Try to acquire share of ReaderWriterMutex.
254 // Is the current thread the exclusive holder of the ReaderWriterMutex.
257 // Assert the current thread has exclusive access to the ReaderWriterMutex.
265 // Assert the current thread doesn't have exclusive access to the ReaderWriterMutex.
273 // Is the current thread a shared holder of the ReaderWriterMutex.
276 // Assert the current thread has shared access to the ReaderWriterMutex.
285 // Assert the current thread doesn't hold this ReaderWriterMutex either in shared or exclusive
311 DISALLOW_COPY_AND_ASSIGN(ReaderWriterMutex);
372 // Scoped locker/unlocker for a ReaderWriterMutex that acquires read access to mu upon
376 explicit ReaderMutexLock(Thread* self, ReaderWriterMutex& mu) EXCLUSIVE_LOCK_FUNCTION(mu) :
387 ReaderWriterMutex& mu_;
394 // Scoped locker/unlocker for a ReaderWriterMutex that acquires write access to mu upon
398 explicit WriterMutexLock(Thread* self, ReaderWriterMutex& mu) EXCLUSIVE_LOCK_FUNCTION(mu) :
409 ReaderWriterMutex& mu_;