wibble::sys::MutexLockT< Mutex > Class Template Reference

Acquire a mutex lock, RAII-style. More...

`#include <mutex.h>`

Collaboration diagram for wibble::sys::MutexLockT< Mutex >:
[legend]

## Public Member Functions

| MutexLockT (Mutex &m)
| ~MutexLockT ()
void | drop ()
void | reclaim ()
void | setYield (bool y)
void | checkYield ()

## Public Attributes

Mutex & | mutex
bool | locked
bool | yield

## Friends

class | Condition

## Detailed Description

### template<typename Mutex>
class wibble::sys::MutexLockT< Mutex >

Acquire a mutex lock, RAII-style.

## Constructor & Destructor Documentation

template<typename Mutex >

wibble::sys::MutexLockT< Mutex >::MutexLockT | ( | Mutex & | m | ) |

inline

References wibble::sys::Mutex::lock().

template<typename Mutex >

wibble::sys::MutexLockT< Mutex >::~MutexLockT | ( |  | ) |

inline

References wibble::sys::MutexLockT< Mutex >::checkYield(), and wibble::sys::Mutex::unlock().

## Member Function Documentation

template<typename Mutex >

void wibble::sys::MutexLockT< Mutex >::checkYield | ( |  | ) |

inline

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

template<typename Mutex >

void wibble::sys::MutexLockT< Mutex >::drop | ( |  | ) |

inline

References wibble::sys::MutexLockT< Mutex >::checkYield(), and wibble::sys::Mutex::unlock().

template<typename Mutex >

void wibble::sys::MutexLockT< Mutex >::reclaim | ( |  | ) |

inline

References wibble::sys::Mutex::lock().

template<typename Mutex >

void wibble::sys::MutexLockT< Mutex >::setYield | ( | bool | y | ) |

inline

## Friends And Related Function Documentation

template<typename Mutex >

friend class Condition

friend

## Member Data Documentation

template<typename Mutex >

bool wibble::sys::MutexLockT< Mutex >::locked

template<typename Mutex >

Mutex& wibble::sys::MutexLockT< Mutex >::mutex

Referenced by wibble::sys::Condition::wait().

template<typename Mutex >

bool wibble::sys::MutexLockT< Mutex >::yield

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

- mutex.h