updated fixed timeslot task

This commit is contained in:
2021-03-23 14:45:33 +01:00
parent d781c6fcec
commit aaceac81af
2 changed files with 9 additions and 31 deletions

View File

@ -12,7 +12,7 @@
#if defined(WIN32)
#include <processthreadsapi.h>
#include <fsfw/osal/windows/winTaskHelpers.h>
#elif defined(LINUX)
#elif defined(__unix__)
#include <pthread.h>
#endif
@ -26,10 +26,10 @@ PeriodicTask::PeriodicTask(const char *name, TaskPriority setPriority,
mainThread = std::thread(&PeriodicTask::taskEntryPoint, this, this);
#if defined(_WIN32)
tasks::setTaskPriority(reinterpret_cast<HANDLE>(mainThread.native_handle()), setPriority);
tasks::insertTaskName(mainThread.get_id(), taskName);
#elif defined(__unix__)
// TODO: We could reuse existing code here.
#endif
tasks::insertTaskName(mainThread.get_id(), taskName);
}
PeriodicTask::~PeriodicTask(void) {