4848* stdio (printf() and friends) should be called from a single task
4949* only or serialized with a FreeRTOS primitive such as a binary
5050* semaphore or mutex.
51- *
52- * Note: When using LLDB (the default debugger on macOS) with this port,
51+ *
52+ * Note: When using LLDB (the default debugger on macOS) with this port,
5353* suppress SIGUSR1 to prevent debugger interference. This can be
5454* done by adding the following line to ~/.lldbinit:
5555* `process handle SIGUSR1 -n true -p false -s false`
@@ -324,6 +324,7 @@ BaseType_t xPortStartScheduler( void )
324324void vPortEndScheduler ( void )
325325{
326326 Thread_t * pxCurrentThread ;
327+ BaseType_t xIsFreeRTOSThread ;
327328
328329 /* Stop the timer tick thread. */
329330 xTimerTickThreadShouldRun = false;
@@ -332,14 +333,14 @@ void vPortEndScheduler( void )
332333 /* Check whether the current thread is a FreeRTOS thread.
333334 * This has to happen before the scheduler is signaled to exit
334335 * its loop to prevent data races on the thread key. */
335- BaseType_t is_freertos_thread = prvIsFreeRTOSThread ();
336+ xIsFreeRTOSThread = prvIsFreeRTOSThread ();
336337
337338 /* Signal the scheduler to exit its loop. */
338339 xSchedulerEnd = pdTRUE ;
339340 ( void ) pthread_kill ( hMainThread , SIG_RESUME );
340341
341342 /* Waiting to be deleted here. */
342- if ( is_freertos_thread == pdTRUE )
343+ if ( xIsFreeRTOSThread == pdTRUE )
343344 {
344345 pxCurrentThread = prvGetThreadFromTask ( xTaskGetCurrentTaskHandle () );
345346 event_wait ( pxCurrentThread -> ev );
0 commit comments