Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
LockGuard Class Reference

RAII mutex locker. More...

#include <LockGuard.h>

Public Member Functions

 LockGuard (rtos::Mutex &mutex)
 Construct a LockGuard instance and ackire ownership of mutex in input. More...
 
 ~LockGuard ()
 Destruct the lock and release the inner mutex. More...
 

Detailed Description

RAII mutex locker.

The mutex pass in the constructor will be locked for the lifetime of the LockGuard instance.

Definition at line 28 of file LockGuard.h.

Constructor & Destructor Documentation

LockGuard ( rtos::Mutex mutex)

Construct a LockGuard instance and ackire ownership of mutex in input.

Parameters
mutexThe mutex to ackire ownership of.

Definition at line 34 of file LockGuard.h.

~LockGuard ( )

Destruct the lock and release the inner mutex.

Definition at line 42 of file LockGuard.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.