wibble::sys::Mutex Class Reference

pthread mutex wrapper; WARNING: the class allows copying and assignment, but this is not always safe. More...

`#include <mutex.h>`

## Public Member Functions

| Mutex (bool recursive=false)
| Mutex (const Mutex &)
| ~Mutex ()
bool | trylock ()
void | lock ()
| Lock the mutex Normally it's better to use MutexLock. More...
void | unlock ()
| Unlock the mutex Normally it's better to use MutexLock. More...
void | reinit ()
| Reinitialize the mutex. More...

## Friends

class | Condition

## Detailed Description

pthread mutex wrapper; WARNING: the class allows copying and assignment, but this is not always safe.

You should never copy a locked mutex. It is however safe to copy when there is no chance of any of the running threads using the mutex.

## Constructor & Destructor Documentation

## Mutex() [1/2]

wibble::sys::Mutex::Mutex | ( | bool | recursive = `false` | ) |

inline

## Mutex() [2/2]

wibble::sys::Mutex::Mutex | ( | const Mutex & |  | ) |

inline

## ~Mutex()

wibble::sys::Mutex::~Mutex | ( |  | ) |

inline

## Member Function Documentation

## lock()

void wibble::sys::Mutex::lock | ( |  | ) |

inline

Lock the mutex Normally it's better to use MutexLock.

Referenced by wibble::sys::MutexLockT< Mutex >::MutexLockT(), and wibble::sys::MutexLockT< Mutex >::reclaim().

## reinit()

void wibble::sys::Mutex::reinit | ( |  | ) |

inline

Reinitialize the mutex.

## trylock()

bool wibble::sys::Mutex::trylock | ( |  | ) |

inline

## unlock()

void wibble::sys::Mutex::unlock | ( |  | ) |

inline

Unlock the mutex Normally it's better to use MutexLock.

Referenced by wibble::sys::MutexLockT< Mutex >::drop(), and wibble::sys::MutexLockT< Mutex >::~MutexLockT().

## Friends And Related Function Documentation

## Condition

friend class Condition

friend

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

- mutex.h