architecture dependant call delcared external
This commit is contained in:
@ -8,15 +8,9 @@
|
||||
|
||||
extern "C" {
|
||||
#include "FreeRTOS.h"
|
||||
#include "portmacro.h"
|
||||
#include "task.h"
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: This stuff is hardware and architecture and mission dependant...
|
||||
* Maybe there is a better solution? The request ContextSwitch function
|
||||
* could be declared external for example.
|
||||
*/
|
||||
void TaskManagement::requestContextSwitchFromTask() {
|
||||
vTaskDelay(0);
|
||||
}
|
||||
@ -24,7 +18,7 @@ void TaskManagement::requestContextSwitchFromTask() {
|
||||
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();
|
||||
requestContextSwitchFromISR();
|
||||
} else {
|
||||
requestContextSwitchFromTask();
|
||||
}
|
||||
|
Reference in New Issue
Block a user