cgv
cgv::os::mutex Struct Reference

#include <mutex.h>

Inheritance diagram for cgv::os::mutex:
cgv::os::condition_mutex

Public Member Functions

 mutex ()
 construct a mutex
 
 ~mutex ()
 destruct a mutex
 
bool try_lock ()
 try to lock the mutex (return false if the mutex is still locked)
 
void lock ()
 lock the mutex (if the mutex is already locked, the caller is blocked until the mutex becomes available) More...
 
void unlock ()
 unlock the mutex
 
void debug_lock (const std::string &info)
 same as lock but with printing debug information
 
void debug_unlock (const std::string &info)
 same unlock but with printing debug information
 

Static Public Member Functions

static unsigned get_debug_lock_counter ()
 return the global locking counter that is used for mutex debugging
 

Detailed Description

A simple mutex (mutual exclusion) for solving thread synchronisation problems.

Member Function Documentation

◆ lock()

void cgv::os::mutex::lock ( )

lock the mutex (if the mutex is already locked, the caller is blocked until the mutex becomes available)

lock the mutex (if the mutex is still locked, the caller is blocked until the mutex becomes available)


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