fsfw/osal/FreeRTOS/TaskManagement.cpp

29 lines
566 B
C++
Raw Normal View History

2020-04-22 19:50:07 +02:00
/**
* @file TaskManagement.cpp
*
* @date 26.02.2020
*
*/
#include <framework/osal/FreeRTOS/TaskManagement.h>
2020-04-22 19:53:06 +02:00
extern "C" {
#include "FreeRTOS.h"
2020-04-22 19:50:07 +02:00
#include "task.h"
2020-04-22 19:53:06 +02:00
}
2020-04-22 19:50:07 +02:00
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();
2020-04-22 19:50:07 +02:00
} else {
requestContextSwitchFromTask();
}
}