Pyrogenesis  trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CScopeLock Class Reference

Locks a CMutex over this object's lifetime. More...

#include <ThreadUtil.h>

Public Member Functions

 CScopeLock (pthread_mutex_t *mutex)
 
 CScopeLock (CMutex &mutex)
 
 ~CScopeLock ()
 

Private Member Functions

 NONCOPYABLE (CScopeLock)
 

Private Attributes

pthread_mutex_tm_Mutex
 

Detailed Description

Locks a CMutex over this object's lifetime.

The mutexes are non-recursive - a single thread locking a mutex more than once results in undefined behaviour.

Constructor & Destructor Documentation

CScopeLock::CScopeLock ( pthread_mutex_t mutex)
inline
CScopeLock::CScopeLock ( CMutex mutex)
inline
CScopeLock::~CScopeLock ( )
inline

Member Function Documentation

CScopeLock::NONCOPYABLE ( CScopeLock  )
private

Member Data Documentation

pthread_mutex_t* CScopeLock::m_Mutex
private

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