Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
absl::Mutex Class Reference

#include <mutex.h>

Public Types

typedef const struct MuHowSMuHow

Public Member Functions

void AssertHeld () const ASSERT_EXCLUSIVE_LOCK()
void AssertNotHeld () const
void AssertReaderHeld () const ASSERT_SHARED_LOCK()
void Await (const Condition &cond)
bool AwaitWithDeadline (const Condition &cond, absl::Time deadline)
bool AwaitWithTimeout (const Condition &cond, absl::Duration timeout)
void EnableDebugLog (const char *name)
void EnableInvariantDebugging (void(*invariant)(void *), void *arg)
void ForgetDeadlockInfo ()
void LockWhen (const Condition &cond) EXCLUSIVE_LOCK_FUNCTION()
bool LockWhenWithDeadline (const Condition &cond, absl::Time deadline) EXCLUSIVE_LOCK_FUNCTION()
bool LockWhenWithTimeout (const Condition &cond, absl::Duration timeout) EXCLUSIVE_LOCK_FUNCTION()
 Mutex ()
constexpr Mutex (absl::ConstInitType)
void ReaderLock () SHARED_LOCK_FUNCTION()
void ReaderLockWhen (const Condition &cond) SHARED_LOCK_FUNCTION()
bool ReaderLockWhenWithDeadline (const Condition &cond, absl::Time deadline) SHARED_LOCK_FUNCTION()
bool ReaderLockWhenWithTimeout (const Condition &cond, absl::Duration timeout) SHARED_LOCK_FUNCTION()
bool ReaderTryLock () SHARED_TRYLOCK_FUNCTION(true)
void ReaderUnlock () UNLOCK_FUNCTION()
void Unlock () UNLOCK_FUNCTION()
void WriterLockWhen (const Condition &cond) EXCLUSIVE_LOCK_FUNCTION()
bool WriterLockWhenWithDeadline (const Condition &cond, absl::Time deadline) EXCLUSIVE_LOCK_FUNCTION()
bool WriterLockWhenWithTimeout (const Condition &cond, absl::Duration timeout) EXCLUSIVE_LOCK_FUNCTION()
bool WriterTryLock () EXCLUSIVE_TRYLOCK_FUNCTION(true)
void WriterUnlock () UNLOCK_FUNCTION()
 ~Mutex ()

Static Public Member Functions

static void InternalAttemptToUseMutexInFatalSignalHandler ()

Private Member Functions

bool AwaitCommon (const Condition &cond, synchronization_internal::KernelTimeout t)
void Block (base_internal::PerThreadSynch *s)
void Fer (base_internal::PerThreadSynch *w)
void LockSlow (MuHow how, const Condition *cond, int flags) ABSL_ATTRIBUTE_COLD
void LockSlowLoop (SynchWaitParams *waitp, int flags)
bool LockSlowWithDeadline (MuHow how, const Condition *cond, synchronization_internal::KernelTimeout t, int flags)
 Mutex (const volatile Mutex *)
 Mutex (const Mutex &)=delete
Mutexoperator= (const Mutex &)=delete
void Trans (MuHow how)
void TryRemove (base_internal::PerThreadSynch *s)
void UnlockSlow (SynchWaitParams *waitp) ABSL_ATTRIBUTE_COLD
base_internal::PerThreadSynchWakeup (base_internal::PerThreadSynch *w)

Static Private Member Functions

static bool DecrementSynchSem (Mutex *mu, base_internal::PerThreadSynch *w, synchronization_internal::KernelTimeout t)
static void IncrementSynchSem (Mutex *mu, base_internal::PerThreadSynch *w)

Private Attributes

std::atomic< intptr_t > mu_


class CondVar

Detailed Description

Definition at line 138 of file mutex.h.

Member Typedef Documentation

typedef const struct MuHowS* absl::Mutex::MuHow

Definition at line 446 of file mutex.h.

Constructor & Destructor Documentation

absl::Mutex::Mutex ( )

Definition at line 193 of file

constexpr absl::Mutex::Mutex ( absl::ConstInitType  )

Definition at line 910 of file mutex.h.

absl::Mutex::~Mutex ( )

Definition at line 195 of file

absl::Mutex::Mutex ( const volatile Mutex )

Definition at line 510 of file mutex.h.

absl::Mutex::Mutex ( const Mutex )

Member Function Documentation

void absl::Mutex::AssertHeld ( ) const

Definition at line 251 of file

void absl::Mutex::AssertNotHeld ( ) const

Definition at line 253 of file

void absl::Mutex::AssertReaderHeld ( ) const

Definition at line 252 of file

void absl::Mutex::Await ( const Condition cond)

Definition at line 207 of file

bool absl::Mutex::AwaitCommon ( const Condition cond,
synchronization_internal::KernelTimeout  t 

Definition at line 1562 of file

bool absl::Mutex::AwaitWithDeadline ( const Condition cond,
absl::Time  deadline 

Definition at line 214 of file

bool absl::Mutex::AwaitWithTimeout ( const Condition cond,
absl::Duration  timeout 

Definition at line 219 of file

void absl::Mutex::Block ( base_internal::PerThreadSynch s)
bool absl::Mutex::DecrementSynchSem ( Mutex mu,
base_internal::PerThreadSynch w,
synchronization_internal::KernelTimeout  t 

Definition at line 556 of file

void absl::Mutex::EnableDebugLog ( const char *  name)

Definition at line 248 of file

void absl::Mutex::EnableInvariantDebugging ( void(*)(void *)  invariant,
void *  arg 

Definition at line 249 of file

void absl::Mutex::Fer ( base_internal::PerThreadSynch w)

Definition at line 2331 of file

void absl::Mutex::ForgetDeadlockInfo ( )

Definition at line 250 of file

void absl::Mutex::IncrementSynchSem ( Mutex mu,
base_internal::PerThreadSynch w 

Definition at line 545 of file

void absl::Mutex::InternalAttemptToUseMutexInFatalSignalHandler ( )

Definition at line 575 of file

void absl::Mutex::Lock ( )

Definition at line 197 of file

void absl::Mutex::LockSlow ( MuHow  how,
const Condition cond,
int  flags 

Definition at line 1750 of file

void absl::Mutex::LockSlowLoop ( SynchWaitParams waitp,
int  flags 

Definition at line 1897 of file

bool absl::Mutex::LockSlowWithDeadline ( MuHow  how,
const Condition cond,
synchronization_internal::KernelTimeout  t,
int  flags 

Definition at line 1832 of file

void absl::Mutex::LockWhen ( const Condition cond)

Definition at line 209 of file

bool absl::Mutex::LockWhenWithDeadline ( const Condition cond,
absl::Time  deadline 

Definition at line 224 of file

bool absl::Mutex::LockWhenWithTimeout ( const Condition cond,
absl::Duration  timeout 

Definition at line 229 of file

Mutex& absl::Mutex::operator= ( const Mutex )
void absl::Mutex::ReaderLock ( )

Definition at line 203 of file

void absl::Mutex::ReaderLockWhen ( const Condition cond)

Definition at line 234 of file

bool absl::Mutex::ReaderLockWhenWithDeadline ( const Condition cond,
absl::Time  deadline 

Definition at line 243 of file

bool absl::Mutex::ReaderLockWhenWithTimeout ( const Condition cond,
absl::Duration  timeout 

Definition at line 239 of file

bool absl::Mutex::ReaderTryLock ( )
void absl::Mutex::ReaderUnlock ( )

Definition at line 205 of file

void absl::Mutex::Trans ( MuHow  how)

Definition at line 2323 of file

bool absl::Mutex::TryLock ( )

Definition at line 201 of file

void absl::Mutex::TryRemove ( base_internal::PerThreadSynch s)

Definition at line 1053 of file

void absl::Mutex::Unlock ( )

Definition at line 199 of file

void absl::Mutex::UnlockSlow ( SynchWaitParams waitp)

Definition at line 2016 of file

PerThreadSynch * absl::Mutex::Wakeup ( base_internal::PerThreadSynch w)

Definition at line 1136 of file

void absl::Mutex::WriterLock ( )

Definition at line 260 of file mutex.h.

void absl::Mutex::WriterLockWhen ( const Condition cond)

Definition at line 322 of file mutex.h.

bool absl::Mutex::WriterLockWhenWithDeadline ( const Condition cond,
absl::Time  deadline 

Definition at line 387 of file mutex.h.

bool absl::Mutex::WriterLockWhenWithTimeout ( const Condition cond,
absl::Duration  timeout 

Definition at line 367 of file mutex.h.

bool absl::Mutex::WriterTryLock ( )

Definition at line 264 of file mutex.h.

void absl::Mutex::WriterUnlock ( )

Definition at line 262 of file mutex.h.

Friends And Related Function Documentation

friend class CondVar

Definition at line 503 of file mutex.h.

Member Data Documentation

std::atomic<intptr_t> absl::Mutex::mu_

Definition at line 473 of file mutex.h.

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

autogenerated on Wed Jun 19 2019 19:19:59