foobar2000 SDK  2015-01-14
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
pfc::mutexBase

#include <synchro_nix.h>

+ Inheritance diagram for pfc::mutexBase:

Public Member Functions

void create (const pthread_mutexattr_t *attr)
 
void create (const mutexAttr &)
 
void createRecur ()
 
void destroy ()
 
void enter () throw ()
 
void leave () throw ()
 
void lock () throw ()
 
void unlock () throw ()
 

Protected Member Functions

 mutexBase ()
 
 ~mutexBase ()
 

Private Member Functions

 mutexBase (const mutexBase &)
 
void operator= (const mutexBase &)
 

Private Attributes

pthread_mutex_t obj
 

Detailed Description

Definition at line 20 of file synchro_nix.h.

Constructor & Destructor Documentation

pfc::mutexBase::mutexBase ( )
inlineprotected

Definition at line 33 of file synchro_nix.h.

33 {}
pfc::mutexBase::~mutexBase ( )
inlineprotected

Definition at line 34 of file synchro_nix.h.

34 {}
pfc::mutexBase::mutexBase ( const mutexBase )
private

Member Function Documentation

void pfc::mutexBase::create ( const pthread_mutexattr_t *  attr)

Definition at line 5 of file synchro_nix.cpp.

5  {
6  if (pthread_mutex_init( &obj, attr) != 0) {
7  throw exception_bug_check();
8  }
9  }
pthread_mutex_t obj
Definition: synchro_nix.h:36
void pfc::mutexBase::create ( const mutexAttr a)

Definition at line 16 of file synchro_nix.cpp.

16  {
17  create( & a.attr );
18  }
void create(const pthread_mutexattr_t *attr)
Definition: synchro_nix.cpp:5
void pfc::mutexBase::createRecur ( )

Definition at line 13 of file synchro_nix.cpp.

13  {
14  mutexAttr a; a.setRecursive(); create(&a.attr);
15  }
void create(const pthread_mutexattr_t *attr)
Definition: synchro_nix.cpp:5
void pfc::mutexBase::destroy ( )

Definition at line 10 of file synchro_nix.cpp.

10  {
11  pthread_mutex_destroy( &obj );
12  }
pthread_mutex_t obj
Definition: synchro_nix.h:36
void pfc::mutexBase::enter ( )
throw (
)
inline

Definition at line 25 of file synchro_nix.h.

25 {lock();}
void pfc::mutexBase::leave ( )
throw (
)
inline

Definition at line 26 of file synchro_nix.h.

26 {unlock();}
void pfc::mutexBase::lock ( )
throw (
)
inline

Definition at line 22 of file synchro_nix.h.

22 {pthread_mutex_lock(&obj);}
pthread_mutex_t obj
Definition: synchro_nix.h:36
void pfc::mutexBase::operator= ( const mutexBase )
private
void pfc::mutexBase::unlock ( )
throw (
)
inline

Definition at line 23 of file synchro_nix.h.

23 {pthread_mutex_unlock(&obj);}
pthread_mutex_t obj
Definition: synchro_nix.h:36

Field Documentation

pthread_mutex_t pfc::mutexBase::obj
private

Definition at line 36 of file synchro_nix.h.


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