fsfw/osal/FreeRTOS/TaskManagement.cpp
Robin.Mueller d0e8eb386c renamed system context to call context
to avoid conflicts with ISIS library, I don't want to fiddle with
it if we don't have source code
2020-03-02 01:00:17 +01:00

27 lines
562 B
C++

/**
* @file TaskManagement.cpp
*
* @date 26.02.2020
*
*/
#include <framework/osal/FreeRTOS/TaskManagement.h>
#include <FreeRTOS.h>
#include "portmacro.h"
#include "task.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
portYIELD_FROM_ISR();
} else {
requestContextSwitchFromTask();
}
}