proxygen
folly::FakeAllPowerfulAssertingMutexInternal Class Reference

Public Types

enum  CurrentLockState { CurrentLockState::UNLOCKED, CurrentLockState::SHARED, CurrentLockState::UPGRADE, CurrentLockState::UNIQUE }
 

Public Member Functions

void lock ()
 
void unlock ()
 
void lock_shared ()
 
void unlock_shared ()
 
void lock_upgrade ()
 
void unlock_upgrade ()
 
void unlock_upgrade_and_lock ()
 
void unlock_and_lock_upgrade ()
 
void unlock_and_lock_shared ()
 
void unlock_upgrade_and_lock_shared ()
 
template<class Rep , class Period >
bool try_lock_for (const std::chrono::duration< Rep, Period > &)
 
template<class Rep , class Period >
bool try_lock_upgrade_for (const std::chrono::duration< Rep, Period > &)
 
template<class Rep , class Period >
bool try_unlock_upgrade_and_lock_for (const std::chrono::duration< Rep, Period > &)
 

Public Attributes

CurrentLockState lock_state {CurrentLockState::UNLOCKED}
 

Detailed Description

Test mutex to help to automate assertions, taken from LockTraitsTest.cpp

Definition at line 204 of file SynchronizedTest.cpp.

Member Enumeration Documentation

Enumerator
UNLOCKED 
SHARED 
UPGRADE 
UNIQUE 

Definition at line 206 of file SynchronizedTest.cpp.

Member Function Documentation

template<class Rep , class Period >
bool folly::FakeAllPowerfulAssertingMutexInternal::try_lock_for ( const std::chrono::duration< Rep, Period > &  )
inline
template<class Rep , class Period >
bool folly::FakeAllPowerfulAssertingMutexInternal::try_lock_upgrade_for ( const std::chrono::duration< Rep, Period > &  )
inline
template<class Rep , class Period >
bool folly::FakeAllPowerfulAssertingMutexInternal::try_unlock_upgrade_and_lock_for ( const std::chrono::duration< Rep, Period > &  )
inline
void folly::FakeAllPowerfulAssertingMutexInternal::unlock_and_lock_shared ( )
inline
void folly::FakeAllPowerfulAssertingMutexInternal::unlock_and_lock_upgrade ( )
inline
void folly::FakeAllPowerfulAssertingMutexInternal::unlock_upgrade_and_lock ( )
inline
void folly::FakeAllPowerfulAssertingMutexInternal::unlock_upgrade_and_lock_shared ( )
inline

Member Data Documentation

CurrentLockState folly::FakeAllPowerfulAssertingMutexInternal::lock_state {CurrentLockState::UNLOCKED}

Definition at line 275 of file SynchronizedTest.cpp.

Referenced by folly::TEST_F().


The documentation for this class was generated from the following file: