7 #ifndef ZPP_INCLUDE_ZPP_LOCK_GUARD_HPP
8 #define ZPP_INCLUDE_ZPP_LOCK_GUARD_HPP
10 #include <zephyr/kernel.h>
11 #include <zephyr/sys/__assert.h>
22 template<
typename T_Mutex>
33 auto res = m_lock.lock();
34 __ASSERT_NO_MSG(res !=
false);
42 auto res = m_lock.unlock();
43 __ASSERT_NO_MSG(res !=
false);
lock_guard using zpp::mutex as a lock.
lock_guard & operator=(const lock_guard &)=delete
lock_guard & operator=(lock_guard &&)=delete
lock_guard(T_Mutex &lock) noexcept
Try locking the mutex waiting forever.
lock_guard(const lock_guard &)=delete
~lock_guard()
unlock the mutex.
lock_guard(lock_guard &&)=delete