| 312 | template<size_t StackSize, bool CanReceiveSignals = {}, size_t QueuedSignals = {}, size_t SignalActions = {}, |
| 313 | typename Function, typename... Args> |
| 314 | StaticThread<StackSize, CanReceiveSignals, QueuedSignals, SignalActions, Function, Args...> |
| 315 | makeAndStartStaticThread(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 |