Loki: LevelMutex.h File Reference

# LevelMutex.h File Reference

Defines classes and functions for LevelMutex facility. More...

`#include <vector>`
`#include <assert.h>`
`#include <time.h>`
`#include <pthread.h>`
`#include <unistd.h>`

Include dependency graph for LevelMutex.h:

This graph shows which files directly or indirectly include this file:

## Classes
class | Loki::LevelMutexInfo
class | Loki::LevelMutexInfo::LevelMutexInfo::Checker
class | Loki::LevelMutexInfo::LevelMutexInfo::MutexUndoer
class | Loki::ThrowOnAnyMutexError
class | Loki::ThrowOnBadDesignMutexError
class | Loki::AssertAnyMutexError
class | Loki::AssertBadDesignMutexError
class | Loki::JustReturnMutexError
class | Loki::NoMutexWait
class | Loki::MutexSleepWaits
class | Loki::SpinLevelMutex
class | Loki::SleepLevelMutex
class | Loki::LevelMutex< MutexPolicy, DefaultLevel, ErrorPolicy, WaitPolicy >
class | Loki::MutexException
class | Loki::MutexLocker
class | Loki::MultiMutexLocker
## Namespaces
namespace | Loki
## Defines
#define | LOKI_THREAD_LOCAL thread_local
## Functions
unsigned int | Loki::GetCurrentThreadsLevel (void)
unsigned int | Loki::CountMutexesInCurrentThread (void)
unsigned int | Loki::CountLocksInCurrentThread (void)
unsigned int | Loki::CountMutexesAtCurrentLevel (void)
MutexErrors::Type | Loki::DoMutexesMatchContainer (const LevelMutexInfo::MutexContainer &mutexes)

## Detailed Description

Defines classes and functions for LevelMutex facility.

## Define Documentation

#define LOKI_THREAD_LOCAL thread_local

thread_local Keyword
  The mutexes require compilers to provide thread local storage - meaning each thread gets its own copy of the data. The next version of C++ will have a new keyword, thread_local for that purpose. Some existing compilers already provide thread local storage using different syntax, so these lines use thread_local to mimic that syntax. If your compiler provides thread local storage but using different syntax besides "thread_local", you may want to modify these lines. If your compiler does not support thread local storage, you can't use LevelMutex.