47volatile bool Thread::SchedulerActive =
false;
54#ifndef CPP_FREERTOS_NO_CPP_STRINGS
56Thread::Thread(
const std::string pcName,
57 uint16_t usStackDepth,
58 UBaseType_t uxPriority)
60 StackDepth(usStackDepth),
64#if (INCLUDE_vTaskDelayUntil == 1)
71 UBaseType_t uxPriority)
73 StackDepth(usStackDepth),
77#if (INCLUDE_vTaskDelayUntil == 1)
88 uint16_t usStackDepth,
89 UBaseType_t uxPriority)
90 : StackDepth(usStackDepth),
94 for (
int i = 0; i < configMAX_TASK_NAME_LEN - 1; i++) {
100 Name[configMAX_TASK_NAME_LEN - 1] = 0;
102#if (INCLUDE_vTaskDelayUntil == 1)
109 UBaseType_t uxPriority)
110 : StackDepth(usStackDepth),
111 Priority(uxPriority),
115#if (INCLUDE_vTaskDelayUntil == 1)
152#ifndef CPP_FREERTOS_NO_CPP_STRINGS
170 return rc != pdPASS ? false :
true;
174#if (INCLUDE_vTaskDelete == 1)
187 handle = (TaskHandle_t)-1;
194 configASSERT( !
"Cannot actually delete a thread object "
195 "if INCLUDE_vTaskDelete is not defined.");
207#if (INCLUDE_vTaskDelete == 1)
211 vTaskDelete(thread->
handle);
214 configASSERT( !
"Cannot return from a thread.run function "
215 "if INCLUDE_vTaskDelete is not defined.");
220#if (INCLUDE_vTaskDelayUntil == 1)
242#ifdef CPP_FREERTOS_CONDITION_VARIABLES
void AddToWaitList(Thread *thread)
virtual bool Lock(TickType_t Timeout=portMAX_DELAY)=0
bool Take(TickType_t Timeout=portMAX_DELAY)
static volatile bool SchedulerActive
const uint16_t StackDepth
static MutexStandard StartGuardLock
static void TaskFunctionAdapter(void *pvParameters)
BinarySemaphore ThreadWaitSem
bool delayUntilInitialized
TickType_t delayUntilPreviousWakeTime
bool Wait(ConditionVariable &Cv, Mutex &CvLock, TickType_t Timeout=portMAX_DELAY)
void DelayUntil(const TickType_t Period)
Thread(const std::string Name, uint16_t StackDepth, UBaseType_t Priority)