c++-gtk-utils: mutex.h File Reference

c++-gtk-utils

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Namespaces | Enumerations
mutex.h File Reference

Provides wrapper classes for pthread mutexes and condition variables, and scoped locking classes for exception safe mutex locking. More...

`#include <exception>`
`#include <pthread.h>`
`#include <time.h>`
`#include <glib.h>`
`#include <c++-gtk-utils/cgu_config.h>`

Go to the source code of this file.

## Classes
struct | Cgu::Thread::CondError
struct | Cgu::Thread::MutexError
struct | Cgu::Thread::RecMutexError
class | Cgu::Thread::Mutex
| A wrapper class for pthread mutexes. More...
class | Cgu::Thread::Mutex::Lock
| A scoped locking class for exception safe Mutex locking. More...
class | Cgu::Thread::Mutex::TrackLock
| A scoped locking class for exception safe Mutex locking which tracks the status of its mutex. More...
class | Cgu::Thread::Cond
| A wrapper class for pthread condition variables. More...
class | Cgu::Thread::RecMutex
| A wrapper class for pthread mutexes which provides a recursive mutex. More...
class | Cgu::Thread::RecMutex::Lock
| A scoped locking class for exception safe RecMutex locking. More...
class | Cgu::Thread::RecMutex::TrackLock
| A scoped locking class for exception safe RecMutex locking which tracks the status of its mutex. More...
class | Cgu::Thread::GrecmutexLock
| A scoped locking class for exception safe locking of GStaticRecMutex objects. More...

## Namespaces
| Cgu
| Cgu::Thread

## Enumerations
enum | Cgu::Thread::Locked { Cgu::Thread::locked }
enum | Cgu::Thread::DeferLock { Cgu::Thread::defer }

## Detailed Description

Provides wrapper classes for pthread mutexes and condition variables, and scoped locking classes for exception safe mutex locking.

Note
  If the system supports monotonic clocks (and this library is not being cross-compiled onto a different architecture), then a system monotonic clock will be used in Cgu::Thread::Cond::timed_wait() and Cgu::Thread::Cond::get_abs_time(). This can be tested at run time with Cgu::Thread::Cond::have_monotonic_clock().