Files
firmware/src/concurrency/Thread.cpp

18 lines
349 B
C++
Raw Normal View History

#include "Thread.h"
2020-07-06 21:53:10 +02:00
#include "timing.h"
namespace concurrency {
void Thread::start(const char *name, size_t stackSize, uint32_t priority)
{
auto r = xTaskCreate(callRun, name, stackSize, this, priority, &taskHandle);
assert(r == pdPASS);
}
void Thread::callRun(void *_this)
{
((Thread *)_this)->doRun();
}
} // namespace concurrency