From 5b0758638b6a81cd984036e910adaa4b39879961 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 28 Jan 2021 00:00:26 +0100 Subject: [PATCH] added missing function is fixed timeslot task --- osal/rtems/FixedTimeslotTask.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/osal/rtems/FixedTimeslotTask.cpp b/osal/rtems/FixedTimeslotTask.cpp index 8b9354254..ce8eadcfc 100644 --- a/osal/rtems/FixedTimeslotTask.cpp +++ b/osal/rtems/FixedTimeslotTask.cpp @@ -8,6 +8,7 @@ #include "../../serviceinterface/ServiceInterface.h" #include +#include #include #include #include @@ -103,20 +104,23 @@ ReturnValue_t FixedTimeslotTask::checkSequence() const { return pst.checkSequence(); } -#include - void FixedTimeslotTask::taskFunctionality() { - // A local iterator for the Polling Sequence Table is created to find the start time for the first entry. + /* A local iterator for the Polling Sequence Table is created to find the start time for + the first entry. */ FixedSlotSequence::SlotListIter it = pst.current; - //The start time for the first entry is read. + /* Initialize the PST with the correct calling task */ + pst.intializeSequenceAfterTaskCreation(); + + /* The start time for the first entry is read. */ rtems_interval interval = RtemsBasic::convertMsToTicks(it->pollingTimeMs); RTEMSTaskBase::setAndStartPeriod(interval,&periodId); //The task's "infinite" inner loop is entered. while (1) { if (pst.slotFollowsImmediately()) { //Do nothing - } else { + } + else { //The interval for the next polling slot is selected. interval = RtemsBasic::convertMsToTicks(this->pst.getIntervalToNextSlotMs()); //The period is checked and restarted with the new interval.