|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
互斥锁的 RAII 机制封装 RAII-style mechanism for automatic mutex management. More...
#include <mutex.hpp>
Public Member Functions | |
| LockGuard (Mutex &mutex) | |
| 构造函数,自动加锁 Constructor automatically locking the mutex. | |
| ~LockGuard () | |
| 析构函数,自动解锁 Destructor automatically unlocking the mutex. | |
互斥锁的 RAII 机制封装 RAII-style mechanism for automatic mutex management.
该类确保在构造时自动加锁,并在析构时自动释放锁。 This class ensures that a mutex is locked upon construction and automatically released upon destruction.
|
inline |
构造函数,自动加锁 Constructor automatically locking the mutex.
| mutex | 需要管理的互斥锁 / Reference to the mutex to manage. |
Definition at line 72 of file mutex.hpp.
|
inline |