Robin.Mueller
d0e8eb386c
to avoid conflicts with ISIS library, I don't want to fiddle with it if we don't have source code
27 lines
562 B
C++
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();
|
|
}
|
|
}
|
|
|
|
|
|
|