Version: 8.3.0
YACS::BASES::MutexPT Class Reference

#include <MutexPT.hxx>

Collaboration diagram for YACS::BASES::MutexPT:

Public Member Functions

 MutexPT ()
 
 ~MutexPT ()
 
void lock ()
 
void unLock ()
 

Private Attributes

pthread_mutex_t _mutexDesc
 
pthread_mutexattr_t _options
 

Friends

class ConditionPT
 

Detailed Description

Definition at line 33 of file MutexPT.hxx.

Constructor & Destructor Documentation

MutexPT::MutexPT ( )

Definition at line 24 of file MutexPT.cxx.

References _mutexDesc.

25 {
26  //pthread_mutexattr_settype(&_options, PTHREAD_MUTEX_FAST_NP);
27  //pthread_mutex_init(&_mutexDesc, &_options);
28  pthread_mutex_init(&_mutexDesc, NULL); // potential hang up at start with commented init
29 }
MutexPT::~MutexPT ( )

Definition at line 31 of file MutexPT.cxx.

References _mutexDesc.

32 {
33  pthread_mutex_destroy(&_mutexDesc);
34 }

Member Function Documentation

void MutexPT::lock ( )

Definition at line 36 of file MutexPT.cxx.

References _mutexDesc.

37 {
38  pthread_mutex_lock(&_mutexDesc);
39 }
void MutexPT::unLock ( )

Definition at line 41 of file MutexPT.cxx.

References _mutexDesc.

42 {
43  pthread_mutex_unlock(&_mutexDesc);
44 }

Friends And Related Function Documentation

friend class ConditionPT
friend

Definition at line 40 of file MutexPT.hxx.

Member Data Documentation

pthread_mutex_t YACS::BASES::MutexPT::_mutexDesc
private

Definition at line 42 of file MutexPT.hxx.

Referenced by lock(), MutexPT(), unLock(), YACS::BASES::ConditionPT::wait(), and ~MutexPT().

pthread_mutexattr_t YACS::BASES::MutexPT::_options
private

Definition at line 43 of file MutexPT.hxx.


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