fsfw/src/fsfw/osal/freertos/TaskManagement.cpp
Ulrich Mohr 8b9a468893
Some checks failed
fsfw/fsfw/pipeline/head There was a failure building this commit
hotfixes to get it to compile for freertos/arm-none-eabi
2023-09-18 22:56:53 +02:00

21 lines
752 B
C++

#include "fsfw/osal/freertos/TaskManagement.h"
void TaskManagement::vRequestContextSwitchFromTask() { vTaskDelay(0); }
void TaskManagement::requestContextSwitch(CallContext callContext = CallContext::TASK) {
if (callContext == CallContext::ISR) {
// This function depends on the partmacro.h definition for the specific device
//vRequestContextSwitchFromISR();
//TODO is this all still needed in current freeRTOS?
vRequestContextSwitchFromTask();
} else {
vRequestContextSwitchFromTask();
}
}
TaskHandle_t TaskManagement::getCurrentTaskHandle() { return xTaskGetCurrentTaskHandle(); }
size_t TaskManagement::getTaskStackHighWatermark(TaskHandle_t task) {
return uxTaskGetStackHighWaterMark(task) * sizeof(StackType_t);
}