Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.

Definition at line 73 of file ThreadUtil.h.

Constructor & Destructor Documentation

CScopeLock::CScopeLock ( pthread_mutex_t mutex)
inline

Definition at line 78 of file ThreadUtil.h.

CScopeLock::CScopeLock ( CMutex mutex)
inline

Definition at line 84 of file ThreadUtil.h.

CScopeLock::~CScopeLock ( )
inline

Definition at line 90 of file ThreadUtil.h.

Member Function Documentation

CScopeLock::NONCOPYABLE ( CScopeLock  )
private

Member Data Documentation

pthread_mutex_t* CScopeLock::m_Mutex
private

Definition at line 96 of file ThreadUtil.h.


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