My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::Mutex Class Reference

Public Member Functions

 Mutex ()
 
virtual ~Mutex ()
 
void lock ()
 
void unlock ()
 
bool tryLock ()
 
bool isLocked ()
 
pthread_mutex_t getPthreadVar ()
 
pthread_mutex_t * getPthreadVarPtr ()
 
bool isItMe ()
 

Constructor & Destructor Documentation

Mutex::Mutex ( )

Constructor.

....................................................................... Constructor.

Mutex::~Mutex ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

bool Mutex::isItMe ( )

....................................................................... Return true if the calling thread is the one already locking this mutex.

bool Mutex::isLocked ( )

Somewhat redundant with tryLock(), except that the mutex is unlocked on exit. Used for checking if someone else has locked a mutex without actually wanting to lock it ourselves.

....................................................................... Return true if the mutex is locked.

void Mutex::lock ( )

....................................................................... Lock the mutex.

bool Mutex::tryLock ( )

Return true if the mutex was successfully locked by this call.

....................................................................... Get a lock if the mutex is available. Return true if the lock was successful

void Mutex::unlock ( )

....................................................................... Unlock the mutex.


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