fesa-core  4.3.1
fesa::Mutex Class Reference

#include <Mutex.h>

Inheritance diagram for fesa::Mutex:
fesa::SharedMutex

Public Member Functions

void lock () const
 
void unlock () const
 

Protected Member Functions

 Mutex (bool init)
 
void checkAlignment () const
 

Detailed Description

Object which allows mutual exclusion between threads. Internally, wraps a pthread_mutex_t.

Constructor & Destructor Documentation

fesa::Mutex::Mutex ( bool  init)
protected

Constructor which can skip initialization of mutex_.

Parameters
initthe mutex is initialized only if this is true.

Member Function Documentation

void fesa::Mutex::checkAlignment ( ) const
protected

Checks that mutex_ is properly aligned.

Exceptions
FesaExceptionif mutex_ is not properly aligned.
void fesa::Mutex::lock ( ) const

Locks the mutex. Only one thread can hold a lock on the mutex at a time.

void fesa::Mutex::unlock ( ) const

the mutex.


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