Skip to content

Commit e8a508a

Browse files
committed
POSIX port - Fix subsequent scheduler starts by clearing xSchedulerEnd in xPortStartScheduler
Otherwise subsequent calls to xPortStartScheduler will incorrectly return immediately as xSchedulerEnd was still set from the previous scheduler run.
1 parent 3b2ab2c commit e8a508a

File tree

1 file changed

+6
-0
lines changed
  • portable/ThirdParty/GCC/Posix

1 file changed

+6
-0
lines changed

portable/ThirdParty/GCC/Posix/port.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ BaseType_t xPortStartScheduler( void )
223223
int iSignal;
224224
sigset_t xSignals;
225225

226+
/*
227+
* clear out the variable that is used to end the scheduler, otherwise
228+
* subsequent scheduler restarts will end immediately.
229+
*/
230+
xSchedulerEnd = pdFALSE;
231+
226232
hMainThread = pthread_self();
227233

228234
/* Start the timer that generates the tick ISR(SIGALRM).

0 commit comments

Comments
 (0)