fsfw/osal/FreeRTOS/TaskManagement.cpp
Robin.Mueller 1d4d01d190 Added ISR calls for MQ and task mgmt
The task management defines an external function which
implements a context switch call from an ISR
2020-05-18 17:22:10 +02:00

25 lines
686 B
C++

#include <framework/osal/FreeRTOS/TaskManagement.h>
void TaskManagement::requestContextSwitchFromTask() {
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
requestContextSwitchFromISR();
} else {
requestContextSwitchFromTask();
}
}
TaskHandle_t TaskManagement::getCurrentTaskHandle() {
return xTaskGetCurrentTaskHandle();
}
configSTACK_DEPTH_TYPE TaskManagement::getTaskStackHighWatermark() {
return uxTaskGetStackHighWaterMark(TaskManagement::getCurrentTaskHandle());
}