action
container
contrib
controller
coordinates
datalinklayer
datapool
defaultcfg
devicehandlers
events
fdir
globalfunctions
health
internalError
ipc
memory
modes
monitoring
objectmanager
osal
FreeRTOS
BinSemaphUsingTask.cpp
BinSemaphUsingTask.h
BinarySemaphore.cpp
BinarySemaphore.h
Clock.cpp
CountingSemaphUsingTask.cpp
CountingSemaphUsingTask.h
CountingSemaphore.cpp
CountingSemaphore.h
FixedTimeslotTask.cpp
FixedTimeslotTask.h
FreeRTOSTaskIF.h
MessageQueue.cpp
MessageQueue.h
Mutex.cpp
Mutex.h
MutexFactory.cpp
PeriodicTask.cpp
PeriodicTask.h
QueueFactory.cpp
README.md
SemaphoreFactory.cpp
TaskFactory.cpp
TaskManagement.cpp
TaskManagement.h
Timekeeper.cpp
Timekeeper.h
host
linux
rtems
windows
Endiness.h
InternalErrorCodes.h
parameters
power
pus
returnvalues
rmap
serialize
serviceinterface
storagemanager
subsystem
tasks
tcdistribution
thermal
timemanager
tmstorage
tmtcpacket
tmtcservices
unittest
.gitignore
.gitmodules
CHANGELOG
FSFWVersion.h
LICENSE
NOTICE
README.md
fsfw.mk
25 lines
660 B
C++
25 lines
660 B
C++
#include "../../osal/FreeRTOS/TaskManagement.h"
|
|
|
|
void TaskManagement::vRequestContextSwitchFromTask() {
|
|
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
|
|
vRequestContextSwitchFromISR();
|
|
} else {
|
|
vRequestContextSwitchFromTask();
|
|
}
|
|
}
|
|
|
|
TaskHandle_t TaskManagement::getCurrentTaskHandle() {
|
|
return xTaskGetCurrentTaskHandle();
|
|
}
|
|
|
|
size_t TaskManagement::getTaskStackHighWatermark(
|
|
TaskHandle_t task) {
|
|
return uxTaskGetStackHighWaterMark(task) * sizeof(StackType_t);
|
|
}
|