From 62598e9bfbe41f88afe7d85ba5dc8b026e8fde39 Mon Sep 17 00:00:00 2001 From: Alfred Gedeon Date: Fri, 4 Sep 2020 13:53:08 -0700 Subject: [PATCH] Fix: uncomment commented out code --- portable/ThirdParty/GCC/Posix/port.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index 195d6b965..2b4544215 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -211,6 +211,7 @@ void vPortEndScheduler( void ) { struct itimerval itimer; struct sigaction sigtick; +Thread_t *xCurrentThread; /* Stop the timer and ignore any pending SIGALRMs that would end * up running on the main thread when it is resumed. */ @@ -230,7 +231,8 @@ struct sigaction sigtick; xSchedulerEnd = pdTRUE; (void)pthread_kill( hMainThread, SIG_RESUME ); - //prvSuspendSelf(); + xCurrentThread = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() ); + prvSuspendSelf(xCurrentThread); } /*-----------------------------------------------------------*/