The mutex counter is a counter variable which can safely be incremented or decremented by multiple threads.
#include <thread.h>
Inherits ost::Mutex.
MutexCounter (const char *id=NULL)
Create and optionally name a mutex protected counter. MutexCounter (int initial, const char *id=NULL)
Create and optionally name a mutex protected counter with an initial value.
__EXPORT int operator++ (MutexCounter &mc)
__EXPORT int operator-- (MutexCounter &mc)
The Mutex Counter is a counter variable which can safely be incremented or decremented by multiple threads.
A Mutex is used to protect access to the counter variable (an integer). An initial value can be specified for the counter, and it can be manipulated with the ++ and -- operators.
Author:
David Sugar [email protected] Thread protected integer counter.
Create and optionally name a mutex protected counter.
Parameters:
id name for mutex counter, optional for deadlock testing.
Create and optionally name a mutex protected counter with an initial value.
Parameters:
initial value of counter.
id name of counter, optional for deadlock testing.
Generated automatically by Doxygen for GNU CommonC++ from the source code.