fix8  version 1.4.0
Open Source C++ FIX Framework
FIX8::f8_mutex Class Reference

generic pthread_mutex wrapper More...

#include <thread.hpp>

Public Member Functions

 f8_mutex ()
 
 ~f8_mutex ()
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 

Private Attributes

pthread_mutex_t _pmutex
 

Detailed Description

generic pthread_mutex wrapper

Definition at line 299 of file thread.hpp.

Constructor & Destructor Documentation

FIX8::f8_mutex::f8_mutex ( )
inline

Definition at line 304 of file thread.hpp.

305  {
306  if (pthread_mutex_init(&_pmutex, 0))
307  throw f8Exception("pthread_mutex_init failed");
308  }
pthread_mutex_t _pmutex
Definition: thread.hpp:301
FIX8::f8_mutex::~f8_mutex ( )
inline

Definition at line 310 of file thread.hpp.

310 { pthread_mutex_destroy(&_pmutex); };
pthread_mutex_t _pmutex
Definition: thread.hpp:301

Member Function Documentation

void FIX8::f8_mutex::lock ( )
inline

Definition at line 312 of file thread.hpp.

312 { pthread_mutex_lock(&_pmutex); }
pthread_mutex_t _pmutex
Definition: thread.hpp:301
bool FIX8::f8_mutex::try_lock ( )
inline

Definition at line 313 of file thread.hpp.

313 { return pthread_mutex_trylock(&_pmutex) == 0; }
pthread_mutex_t _pmutex
Definition: thread.hpp:301
void FIX8::f8_mutex::unlock ( )
inline

Definition at line 314 of file thread.hpp.

314 { pthread_mutex_unlock(&_pmutex); }
pthread_mutex_t _pmutex
Definition: thread.hpp:301

Member Data Documentation

pthread_mutex_t FIX8::f8_mutex::_pmutex
private

Definition at line 301 of file thread.hpp.


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