STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::scoped_mutex_lock Class Reference

Detailed Description

Aquire a lock that's valid until the end of scope.

Definition at line 123 of file mutex.h.

+ Collaboration diagram for stxxl::scoped_mutex_lock:

Public Member Functions

 scoped_mutex_lock (mutex &m)
 lock mutex More...
 
 ~scoped_mutex_lock ()
 unlock mutex hold when object goes out of scope. More...
 
pthread_mutex_t & native_handle ()
 return platform specific handle More...
 
void unlock ()
 unlock mutex hold prematurely More...
 

Private Attributes

bool is_locked
 marker if already unlocked by this thread (needs no synchronization) More...
 
mutexm_mutex
 mutex reference More...
 

Constructor & Destructor Documentation

stxxl::scoped_mutex_lock::scoped_mutex_lock ( mutex m)
inline

lock mutex

Definition at line 133 of file mutex.h.

stxxl::scoped_mutex_lock::~scoped_mutex_lock ( )
inline

unlock mutex hold when object goes out of scope.

Definition at line 139 of file mutex.h.

Member Function Documentation

pthread_mutex_t& stxxl::scoped_mutex_lock::native_handle ( )
inline

return platform specific handle

Definition at line 152 of file mutex.h.

Referenced by stxxl::condition_variable::wait().

Member Data Documentation

bool stxxl::scoped_mutex_lock::is_locked
private

marker if already unlocked by this thread (needs no synchronization)

Definition at line 129 of file mutex.h.

mutex& stxxl::scoped_mutex_lock::m_mutex
private

mutex reference

Definition at line 126 of file mutex.h.


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