Ulrich Mohr
8b9a468893
Some checks failed
fsfw/fsfw/pipeline/head There was a failure building this commit
21 lines
752 B
C++
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);
|
|
}
|