MCPcopy Create free account
hub / github.com/DISTORTEC/distortos / makeAndStartStaticThread

Function makeAndStartStaticThread

include/distortos/StaticThread.hpp:314–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312template<size_t StackSize, bool CanReceiveSignals = {}, size_t QueuedSignals = {}, size_t SignalActions = {},
313 typename Function, typename... Args>
314StaticThread<StackSize, CanReceiveSignals, QueuedSignals, SignalActions, Function, Args...>
315makeAndStartStaticThread(const uint8_t priority, const SchedulingPolicy schedulingPolicy, Function&& function,
316 Args&&... args)
317{
318 auto thread = makeStaticThread<StackSize, CanReceiveSignals, QueuedSignals, SignalActions>(priority,
319 schedulingPolicy, std::forward<Function>(function), std::forward<Args>(args)...);
320 {
321 const auto ret = thread.start();
322 assert(ret == 0 && "Could not start thread!");
323 }
324 return thread;
325}
326
327/**
328 * \brief Helper factory function to make and start StaticThread object with partially deduced template arguments

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected