#include <scheduler.h>
Definition at line 98 of file scheduler.h.
◆ schfunc_t
◆ action_s() [1/7]
constexpr action_s::action_s |
( |
const schfunc_t |
callback, |
|
|
char const *const |
fn_name_ |
|
) |
| |
|
inlineconstexprprivatenoexcept |
◆ action_s() [2/7]
|
inlineconstexprprivatenoexcept |
Definition at line 109 of file scheduler.h.
static tstrWifiInitParam param
◆ action_s() [3/7]
constexpr action_s::action_s |
( |
const schfunc_t |
callback | ) |
|
|
inlineconstexprprivatenoexcept |
◆ action_s() [4/7]
|
inlineconstexprprivatenoexcept |
◆ action_s() [5/7]
◆ action_s() [6/7]
◆ action_s() [7/7]
Definition at line 169 of file scheduler.h.
170 #if EFI_UNIT_TEST
172 #endif
173 {
176 #if EFI_UNIT_TEST
178 #endif
179 }
◆ execute()
void action_s::execute |
( |
| ) |
const |
|
inline |
Definition at line 230 of file scheduler.h.
230 {
232 #if EFI_UNIT_TEST_VERBOSE_ACTION
234 "with raw arg = " <<
m_param << std::endl;
235 #endif
237 } else {
238 #ifdef WE_HAVE_CRITICAL_ERROR_METHOD
240 #endif
241
242 #if EFI_UNIT_TEST
243 assert(false);
244 #endif
245 }
246 }
void efiCriticalError(const char *message)
uintptr_t scheduler_arg_t
◆ from_scheduler_arg_t()
template<typename T >
|
inlinestaticconstexprprivatenoexcept |
Definition at line 118 of file scheduler.h.
118 {
119 static_assert(std::is_pointer_v<T> || std::is_integral_v<T>, "Unsupported type");
120 if constexpr (std::is_pointer_v<T>) {
121 return reinterpret_cast<T>(raw);
122 } else {
123 return static_cast<T>(raw);
124 }
125 }
◆ getArgument()
template<typename T >
constexpr T action_s::getArgument |
( |
| ) |
const |
|
inlineconstexpr |
◆ getArgumentRaw()
◆ getCallback()
constexpr schfunc_t action_s::getCallback |
( |
| ) |
const |
|
inlineconstexpr |
◆ getCallbackName()
constexpr char const * action_s::getCallbackName |
( |
| ) |
const |
|
inlineconstexpr |
◆ make() [1/2]
template<auto Func>
static constexpr action_s action_s::make |
( |
| ) |
|
|
inlinestaticconstexprnoexcept |
Definition at line 221 of file scheduler.h.
221 {
222 static_assert(std::is_invocable_r_v<void, decltype(Func)>, "Function signature mismatch");
223 #if EFI_UNIT_TEST
224 return action_s(&trampoline_no_arg<Func>, __PRETTY_FUNCTION__);
225 #else
226 return action_s(&trampoline_no_arg<Func>);
227 #endif
228 }
action_s() noexcept=default
◆ make() [2/2]
template<auto Func, typename Arg >
static constexpr action_s action_s::make |
( |
Arg |
arg | ) |
|
|
inlinestaticconstexprnoexcept |
Definition at line 196 of file scheduler.h.
196 {
197 static_assert(std::is_invocable_r_v<void, decltype(Func), Arg>, "Function signature mismatch");
198 #if EFI_UNIT_TEST_VERBOSE_ACTION
199 std::cout <<
"action_s::make: " << __PRETTY_FUNCTION__ <<
"(" <<
reinterpret_cast<scheduler_arg_t>(Func) <<
") "
200 "with raw arg = " << arg << "; is_ptr = " << std::is_pointer_v<Arg> << std::endl;
201 #endif
202 if constexpr (std::is_pointer_v<Arg>) {
203
204
205
206
207
208
209 static_assert(alignof(std::remove_pointer_t<Arg>) >= 2, "Pointer must be at least 2-aligned");
210 static_assert(
sizeof(
scheduler_arg_t) ==
sizeof(
void*),
"Unexpected scheduler_arg_t size");
211 }
212 #if EFI_UNIT_TEST
214 #else
216 #endif
217 }
static constexpr scheduler_arg_t to_scheduler_arg_t(T val) noexcept
◆ operator bool()
constexpr action_s::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexpr |
◆ operator=() [1/2]
Definition at line 182 of file scheduler.h.
182 {
187 #if EFI_UNIT_TEST
190 #endif
191 return *this;
192 }
◆ operator=() [2/2]
◆ operator==()
bool constexpr action_s::operator== |
( |
const action_s & |
other | ) |
const |
|
inlineconstexpr |
◆ to_scheduler_arg_t()
template<typename T >
|
inlinestaticconstexprprivatenoexcept |
Definition at line 130 of file scheduler.h.
130 {
131 static_assert(std::is_pointer_v<T> || std::is_integral_v<T>, "Unsupported type");
132 if constexpr (std::is_pointer_v<T>) {
134 } else {
136 }
137 }
Referenced by make().
◆ trampoline()
template<auto Func, typename Arg >
|
inlinestaticconstexprprivatenoexcept |
Definition at line 142 of file scheduler.h.
142 {
143 static_assert(std::is_pointer_v<Arg> || std::is_integral_v<Arg>, "Unsupported type");
144 #if EFI_UNIT_TEST_VERBOSE_ACTION
145 std::cout <<
"action_s::trampoline: " << __PRETTY_FUNCTION__ <<
"(" <<
reinterpret_cast<scheduler_arg_t>(Func) <<
") "
146 "with raw arg = " << raw << "; is_ptr = " << std::is_pointer_v<Arg> << std::endl;
147 #endif
148 if constexpr (std::is_pointer_v<Arg>) {
149 Func(reinterpret_cast<Arg>(raw));
150 } else {
151 Func(static_cast<Arg>(raw));
152 }
153 }
◆ trampoline_no_arg()
template<auto Func>
|
inlinestaticconstexprprivatenoexcept |
Definition at line 157 of file scheduler.h.
157 {
158 #if EFI_UNIT_TEST_VERBOSE_ACTION
159 std::cout <<
"action_s::trampoline_no_arg: " << __PRETTY_FUNCTION__ <<
"(" <<
reinterpret_cast<scheduler_arg_t>(Func) <<
") with no arg" << std::endl;
160 #endif
161 Func();
162 }
◆ fn_name
char const* action_s::fn_name {} |
|
private |
◆ m_callback
◆ m_param
The documentation for this class was generated from the following file: