1
0
forked from fsfw/fsfw

new file for freeRTOS task management functions

This commit is contained in:
2020-02-26 16:55:35 +01:00
parent 083cc7c50a
commit abccd81fdf
7 changed files with 66 additions and 29 deletions

View File

@ -0,0 +1,24 @@
/**
* @file TaskManagement.cpp
*
* @date 26.02.2020
*
*/
#include <framework/osal/FreeRTOS/TaskManagement.h>
#include <FreeRTOS.h>
#include "portmacro.h"
#include "task.h"
void requestContextSwitchFromTask() {
vTaskDelay(0);
}
void requestContextSwitch(SystemContext callContext) {
if(callContext == SystemContext::isr_context) {
// This function depends on the partmacro.h definition for the specific device
portYIELD_FROM_ISR();
} else {
requestContextSwitchFromTask();
}
}