| zpp
    Zephyr C++20 Framework | 
A recursive mutex CRTP base class. More...
#include <mutex.hpp>
| Public Types | |
| using | native_type = struct k_mutex | 
| using | native_pointer = native_type * | 
| using | native_const_pointer = native_type const * | 
| Public Member Functions | |
| auto | lock () noexcept | 
| Lock the mutex. Wait forever until it is locked.  More... | |
| auto | try_lock () noexcept | 
| Try locking the mutex without waiting.  More... | |
| template<class T_Rep , class T_Period > | |
| auto | try_lock_for (const std::chrono::duration< T_Rep, T_Period > &timeout) noexcept | 
| Try locking the mutex with a timeout.  More... | |
| auto | unlock () noexcept | 
| Unlock the mutex.  More... | |
| auto | native_handle () noexcept -> native_pointer | 
| get the native zephyr mutex handle.  More... | |
| auto | native_handle () const noexcept -> native_const_pointer | 
| get the native zephyr mutex handle.  More... | |
| mutex_base (const mutex_base &)=delete | |
| mutex_base (mutex_base &&)=delete | |
| mutex_base & | operator= (const mutex_base &)=delete | 
| mutex_base & | operator= (mutex_base &&)=delete | 
| Protected Member Functions | |
| constexpr | mutex_base () noexcept | 
| Protected default constructor so only derived objects can be created.  More... | |
A recursive mutex CRTP base class.
| using zpp::mutex_base< T_Mutex >::native_const_pointer = native_type const * | 
| using zpp::mutex_base< T_Mutex >::native_pointer = native_type* | 
| using zpp::mutex_base< T_Mutex >::native_type = struct k_mutex | 
| 
 | inlineconstexprprotectednoexcept | 
| 
 | delete | 
| 
 | delete | 
| 
 | inlinenoexcept | 
Lock the mutex. Wait forever until it is locked.
Definition at line 44 of file mutex.hpp.
References zpp::result< T_Ok, T_Error >::assign_error(), zpp::result< T_Ok, T_Error >::assign_value(), zpp::mutex_base< T_Mutex >::native_handle(), and zpp::to_error_code().
| 
 | inlinenoexcept | 
get the native zephyr mutex handle.
Definition at line 136 of file mutex.hpp.
References zpp::mutex_base< T_Mutex >::native_handle().
| 
 | inlinenoexcept | 
get the native zephyr mutex handle.
Definition at line 126 of file mutex.hpp.
Referenced by zpp::mutex_base< T_Mutex >::lock(), zpp::mutex_base< T_Mutex >::native_handle(), zpp::mutex_base< T_Mutex >::try_lock(), zpp::mutex_base< T_Mutex >::try_lock_for(), and zpp::mutex_base< T_Mutex >::unlock().
| 
 | delete | 
| 
 | delete | 
| 
 | inlinenoexcept | 
Try locking the mutex without waiting.
Definition at line 63 of file mutex.hpp.
References zpp::result< T_Ok, T_Error >::assign_error(), zpp::result< T_Ok, T_Error >::assign_value(), zpp::mutex_base< T_Mutex >::native_handle(), and zpp::to_error_code().
| 
 | inlinenoexcept | 
Try locking the mutex with a timeout.
| timeout | The time to wait before returning | 
Definition at line 86 of file mutex.hpp.
References zpp::result< T_Ok, T_Error >::assign_error(), zpp::result< T_Ok, T_Error >::assign_value(), zpp::mutex_base< T_Mutex >::native_handle(), zpp::to_error_code(), and zpp::to_timeout().
| 
 | inlinenoexcept | 
Unlock the mutex.
Definition at line 107 of file mutex.hpp.
References zpp::result< T_Ok, T_Error >::assign_error(), zpp::result< T_Ok, T_Error >::assign_value(), zpp::mutex_base< T_Mutex >::native_handle(), and zpp::to_error_code().