foobar2000 SDK  2015-08-03
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 7 of file synchro_nix.cpp.

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

Definition at line 18 of file synchro_nix.cpp.

18  {
19  create( & a.attr );
20  }
void create(const pthread_mutexattr_t *attr)
Definition: synchro_nix.cpp:7
void pfc::mutexBase::createRecur ( )

Definition at line 15 of file synchro_nix.cpp.

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

Definition at line 12 of file synchro_nix.cpp.

12  {
13  pthread_mutex_destroy( &obj );
14  }
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: