mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Merge branch 'main' into fix-cmake-spaces
This commit is contained in:
commit
260841e855
12
portable/ThirdParty/GCC/Posix/port.c
vendored
12
portable/ThirdParty/GCC/Posix/port.c
vendored
|
@ -48,8 +48,8 @@
|
||||||
* stdio (printf() and friends) should be called from a single task
|
* stdio (printf() and friends) should be called from a single task
|
||||||
* only or serialized with a FreeRTOS primitive such as a binary
|
* only or serialized with a FreeRTOS primitive such as a binary
|
||||||
* semaphore or mutex.
|
* semaphore or mutex.
|
||||||
*
|
*
|
||||||
* Note: When using LLDB (the default debugger on macOS) with this port,
|
* Note: When using LLDB (the default debugger on macOS) with this port,
|
||||||
* suppress SIGUSR1 to prevent debugger interference. This can be
|
* suppress SIGUSR1 to prevent debugger interference. This can be
|
||||||
* done by adding the following line to ~/.lldbinit:
|
* done by adding the following line to ~/.lldbinit:
|
||||||
* `process handle SIGUSR1 -n true -p false -s false`
|
* `process handle SIGUSR1 -n true -p false -s false`
|
||||||
|
@ -324,17 +324,23 @@ BaseType_t xPortStartScheduler( void )
|
||||||
void vPortEndScheduler( void )
|
void vPortEndScheduler( void )
|
||||||
{
|
{
|
||||||
Thread_t * pxCurrentThread;
|
Thread_t * pxCurrentThread;
|
||||||
|
BaseType_t xIsFreeRTOSThread;
|
||||||
|
|
||||||
/* Stop the timer tick thread. */
|
/* Stop the timer tick thread. */
|
||||||
xTimerTickThreadShouldRun = false;
|
xTimerTickThreadShouldRun = false;
|
||||||
pthread_join( hTimerTickThread, NULL );
|
pthread_join( hTimerTickThread, NULL );
|
||||||
|
|
||||||
|
/* Check whether the current thread is a FreeRTOS thread.
|
||||||
|
* This has to happen before the scheduler is signaled to exit
|
||||||
|
* its loop to prevent data races on the thread key. */
|
||||||
|
xIsFreeRTOSThread = prvIsFreeRTOSThread();
|
||||||
|
|
||||||
/* Signal the scheduler to exit its loop. */
|
/* Signal the scheduler to exit its loop. */
|
||||||
xSchedulerEnd = pdTRUE;
|
xSchedulerEnd = pdTRUE;
|
||||||
( void ) pthread_kill( hMainThread, SIG_RESUME );
|
( void ) pthread_kill( hMainThread, SIG_RESUME );
|
||||||
|
|
||||||
/* Waiting to be deleted here. */
|
/* Waiting to be deleted here. */
|
||||||
if( prvIsFreeRTOSThread() == pdTRUE )
|
if( xIsFreeRTOSThread == pdTRUE )
|
||||||
{
|
{
|
||||||
pxCurrentThread = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() );
|
pxCurrentThread = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() );
|
||||||
event_wait( pxCurrentThread->ev );
|
event_wait( pxCurrentThread->ev );
|
||||||
|
|
Loading…
Reference in a new issue