libfoedus-core
FOEDUS Core Library
|
Auto-lock scope object for SharedMutex. More...
Auto-lock scope object for SharedMutex.
SharedMutex itself has auto-release feature, but only when it is on stack. In many cases SharedMutex is placed in shared memory, so its destructor is never called. Instead, this object provides the auto-release semantics.
Definition at line 100 of file shared_mutex.hpp.
#include <shared_mutex.hpp>
Public Member Functions | |
SharedMutexScope (SharedMutex *mutex, bool lock_initially=true) | |
~SharedMutexScope () | |
SharedMutexScope (const SharedMutexScope &)=delete | |
SharedMutexScope & | operator= (const SharedMutexScope &)=delete |
bool | is_locked_by_me () const |
SharedMutex * | get_mutex () const |
void | lock () |
void | unlock () |
|
inline |
Definition at line 102 of file shared_mutex.hpp.
References lock().
|
inline |
Definition at line 108 of file shared_mutex.hpp.
References unlock().
|
delete |
|
inline |
Definition at line 115 of file shared_mutex.hpp.
Referenced by foedus::storage::PartitionerMetadata::allocate_data().
|
inline |
Definition at line 114 of file shared_mutex.hpp.
Referenced by foedus::storage::PartitionerMetadata::allocate_data().
void foedus::soc::SharedMutexScope::lock | ( | ) |
Definition at line 99 of file shared_mutex.cpp.
References foedus::soc::SharedMutex::lock().
Referenced by SharedMutexScope().
|
delete |
void foedus::soc::SharedMutexScope::unlock | ( | ) |
Definition at line 108 of file shared_mutex.cpp.
References foedus::soc::SharedMutex::unlock().
Referenced by foedus::soc::SharedCond::broadcast(), foedus::soc::SharedCond::signal(), and ~SharedMutexScope().