zpp
Zephyr C++20 Framework
|
A CRTP futex base class. More...
#include <futex.hpp>
Public Types | |
using | native_type = struct k_futex |
using | native_pointer = native_type * |
using | native_const_pointer = native_type const * |
Public Member Functions | |
bool | wait (int expected) noexcept |
Wait for the futex. More... | |
bool | try_wait (int expected) noexcept |
Try wait for the futex. More... | |
template<class T_Rep , class T_Period > | |
bool | try_wait_for (int expected, const std::chrono::duration< T_Rep, T_Period > &timeout) noexcept |
Wait for the futex. More... | |
void | wake_one () noexcept |
Wakeup one waiting thread. More... | |
void | wake_all () noexcept |
Wakeup all waiting threads. More... | |
auto | native_handle () noexcept -> native_pointer |
get the native zephyr futex handle. More... | |
auto | native_handle () const noexcept -> native_const_pointer |
get the native zephyr futex handle. More... | |
futex_base (const futex_base &)=delete | |
futex_base (futex_base &&)=delete | |
futex_base & | operator= (const futex_base &)=delete |
futex_base & | operator= (futex_base &&)=delete |
Protected Member Functions | |
constexpr | futex_base () noexcept |
Default constructor. More... | |
A CRTP futex base class.
using zpp::futex_base< T_Futex >::native_const_pointer = native_type const * |
using zpp::futex_base< T_Futex >::native_pointer = native_type * |
using zpp::futex_base< T_Futex >::native_type = struct k_futex |
|
inlineconstexprprotectednoexcept |
|
delete |
|
delete |
|
inlinenoexcept |
get the native zephyr futex handle.
Definition at line 123 of file futex.hpp.
References zpp::futex_base< T_Futex >::native_handle().
|
inlinenoexcept |
get the native zephyr futex handle.
Definition at line 113 of file futex.hpp.
Referenced by zpp::futex_base< T_Futex >::native_handle(), zpp::futex_base< T_Futex >::try_wait(), zpp::futex_base< T_Futex >::try_wait_for(), zpp::futex_base< T_Futex >::wait(), zpp::futex_base< T_Futex >::wake_all(), and zpp::futex_base< T_Futex >::wake_one().
|
delete |
|
delete |
|
inlinenoexcept |
Try wait for the futex.
expected | the expected value |
Definition at line 61 of file futex.hpp.
References zpp::futex_base< T_Futex >::native_handle().
|
inlinenoexcept |
Wait for the futex.
expected | the expected value |
timeout | the timeout before returning |
Definition at line 80 of file futex.hpp.
References zpp::futex_base< T_Futex >::native_handle(), and zpp::to_timeout().
|
inlinenoexcept |
Wait for the futex.
expected | the expected value |
Definition at line 45 of file futex.hpp.
References zpp::futex_base< T_Futex >::native_handle().
|
inlinenoexcept |
Wakeup all waiting threads.
Definition at line 103 of file futex.hpp.
References zpp::futex_base< T_Futex >::native_handle().
|
inlinenoexcept |
Wakeup one waiting thread.
Definition at line 95 of file futex.hpp.
References zpp::futex_base< T_Futex >::native_handle().