#include <synchro.h>
Inheritance diagram for rpa::mutex_count< Mutex >:
Public Member Functions | |
void | lock (void) |
Calls the base class 'count'n a,d increments the counter. | |
void | unlock (void) |
Counter changed before unlocking the mutex of the base class. | |
bool | trylock (void) |
Returns true if lock is busy, or false if could be locked ie was unlocked before. |
void rpa::mutex_count< Mutex >::lock | ( | void | ) | [inline] |
Calls the base class 'count'n a,d increments the counter.
NOTE: The counters can be checked and changed only when the base mutex is locked. Otherwise, there would be a race condition.
bool rpa::mutex_count< Mutex >::trylock | ( | void | ) | [inline] |
Returns true if lock is busy, or false if could be locked ie was unlocked before.
void rpa::mutex_count< Mutex >::unlock | ( | void | ) | [inline] |
Counter changed before unlocking the mutex of the base class.