Class to allow convenient locking and unlocking of mutexes in a C context.
The mutex will be automatically unlocked when the context is left, even if there are multiple return, break or continue statements.
Usage:
void foo() { // ...non-critical-section code here... { OSMutexLock locker(&mutex_); // ...critical section here... if (error) return; // ...more critical code here... } // ...at this point the mutex is unlocked... // ...more non-critical-section code here... }
Definition at line 493 of file OS.hxx.