Class for locking and releasing a mutex in a function.
To ease the obtaining and releasing a lock on a Burger::Mutex, this class is passed a pointer to a mutex and obtains a lock immediately. When the function that has this class locally stored exits, the lock is released.
- Note
- This class is not to be used as a global variable or a member of another class. It will not release a lock until the class is destructed
void foo(void)
{
printf("Do stuff");
}
Class for locking and releasing a mutex in a function.
Definition burger.h:6573
Class for creating a Mutex for a statically allocated critical section of data.
Definition burger.h:6539
- See also
- MutexStatic and Mutex