40#include "freertos-config.h"
55#ifndef CPP_FREERTOS_NO_CPP_STRINGS
61#include "semaphore.hpp"
62#include "condition_variable.hpp"
96#ifndef CPP_FREERTOS_NO_CPP_STRINGS
97 Thread(
const std::string Name,
99 UBaseType_t Priority);
103 UBaseType_t Priority);
112 Thread( uint16_t StackDepth,
113 UBaseType_t Priority);
134 bool Start(
int core);
169 SchedulerActive =
true;
170 vTaskStartScheduler();
185 SchedulerActive =
false;
188#if (INCLUDE_vTaskSuspend == 1)
209#if (INCLUDE_xTaskResumeFromISR == 1)
219#if (INCLUDE_uxTaskPriorityGet == 1)
237 return (uxTaskPriorityGetFromISR(
GetHandle()));
242#if (INCLUDE_vTaskPrioritySet == 1)
250 Priority = NewPriority;
251 vTaskPrioritySet(
GetHandle(), NewPriority);
260#ifndef CPP_FREERTOS_NO_CPP_STRINGS
268 return pcTaskGetName(handle);
293#if (INCLUDE_vTaskDelete == 1)
313#if (INCLUDE_vTaskDelay == 1)
325#if (INCLUDE_vTaskDelayUntil == 1)
345#ifdef CPP_FREERTOS_CONDITION_VARIABLES
363 TickType_t Timeout = portMAX_DELAY);
384 static volatile bool SchedulerActive;
389#ifndef CPP_FREERTOS_NO_CPP_STRINGS
390 const std::string Name;
392 char Name[configMAX_TASK_NAME_LEN];
398 const uint16_t StackDepth;
403 UBaseType_t Priority;
421 static void TaskFunctionAdapter(
void *pvParameters);
423#if (INCLUDE_vTaskDelayUntil == 1)
427 bool delayUntilInitialized;
432 TickType_t delayUntilPreviousWakeTime;
435#ifdef CPP_FREERTOS_CONDITION_VARIABLES
449 ThreadWaitSem.
Give();
Definition: semaphore.hpp:196
Definition: condition_variable.hpp:76
Definition: mutex.hpp:109
Definition: mutex.hpp:171
bool Give()
Definition: csemaphore.cpp:66
Definition: thread.hpp:79
UBaseType_t GetPriorityFromISR()
Definition: thread.hpp:235
void Resume()
Definition: thread.hpp:203
TaskHandle_t GetHandle()
Definition: thread.hpp:148
bool Start()
Definition: cthread.cpp:123
virtual ~Thread()
Definition: cthread.cpp:227
std::string GetName()
Definition: thread.hpp:261
void SetPriority(UBaseType_t NewPriority)
Definition: thread.hpp:248
void Delay(const TickType_t Delay)
Definition: thread.hpp:319
static void StartScheduler()
Definition: thread.hpp:167
void ResetDelayUntil()
Definition: cthread.cpp:276
bool Wait(ConditionVariable &Cv, Mutex &CvLock, TickType_t Timeout=portMAX_DELAY)
Definition: cthread.cpp:287
virtual void Cleanup()
Definition: cthread.cpp:222
void Suspend()
Definition: thread.hpp:195
void DelayUntil(const TickType_t Period)
Definition: cthread.cpp:265
void ResumeFromISR()
Definition: thread.hpp:213
static void Yield()
Definition: thread.hpp:156
UBaseType_t GetPriority()
Definition: thread.hpp:225
static void EndScheduler()
Definition: thread.hpp:182
Definition: condition_variable.hpp:57