refactored threading-related classes, code broken

This commit is contained in:
grcasanova
2020-07-05 23:11:40 +02:00
parent 64da384fc1
commit 0a6059ba13
16 changed files with 243 additions and 245 deletions

View File

@@ -0,0 +1,16 @@
#include "Thread.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