A recursive mutex class borrowing the native mutex.
More...
#include <mutex.hpp>
A recursive mutex class borrowing the native mutex.
Definition at line 191 of file mutex.hpp.
◆ mutex_ref() [1/3]
|
inlineexplicitconstexprnoexcept |
Construct a mutex using a native k_mutex*.
- Parameters
-
m | The k_mutex to use. m must already be initialized and will not be freed. |
Definition at line 199 of file mutex.hpp.
202 __ASSERT_NO_MSG(m_mutex_ptr !=
nullptr);
◆ mutex_ref() [2/3]
template<class T_Mutex >
constexpr zpp::mutex_ref::mutex_ref |
( |
T_Mutex & |
m | ) |
|
|
inlineexplicitconstexprnoexcept |
Construct a mutex using another mutex object.
- Parameters
-
m | The mutex object to use. m must already be initialized and will not be freed. |
Definition at line 212 of file mutex.hpp.
213 : m_mutex_ptr(m.native_handle())
215 __ASSERT_NO_MSG(m_mutex_ptr !=
nullptr);
◆ mutex_ref() [3/3]
zpp::mutex_ref::mutex_ref |
( |
| ) |
|
|
delete |
◆ native_handle() [1/2]
get the native zephyr mutex handle.
- Returns
- A pointer to the zephyr k_mutex.
Definition at line 264 of file mutex.hpp.
◆ native_handle() [2/2]
get the native zephyr mutex handle.
- Returns
- A pointer to the zephyr k_mutex.
Definition at line 254 of file mutex.hpp.
Referenced by operator=().
◆ operator=() [1/2]
Assing another mutex object.
- Parameters
-
m | The k_mutex to use. m must already be initialized and will not be freed. |
- Returns
- reference to this object
Definition at line 226 of file mutex.hpp.
229 __ASSERT_NO_MSG(m_mutex_ptr !=
nullptr);
◆ operator=() [2/2]
template<class T_Mutex >
constexpr mutex_ref& zpp::mutex_ref::operator= |
( |
T_Mutex & |
m | ) |
|
|
inlineconstexprnoexcept |
Assing another mutex object.
- Parameters
-
m | The mutex object to use. m must already be initialized and will not be freed. |
- Returns
- reference to this object
Definition at line 242 of file mutex.hpp.
244 m_mutex_ptr = m.native_handle();
245 __ASSERT_NO_MSG(m_mutex_ptr !=
nullptr);
References native_handle().
The documentation for this class was generated from the following file: