mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
17 lines
329 B
C++
17 lines
329 B
C++
|
|
#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
|