mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Code review suggestions
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
9dda4781a4
commit
9760e45031
5
portable/ThirdParty/GCC/Posix/port.c
vendored
5
portable/ThirdParty/GCC/Posix/port.c
vendored
|
@ -324,6 +324,7 @@ 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;
|
||||||
|
@ -332,14 +333,14 @@ void vPortEndScheduler( void )
|
||||||
/* Check whether the current thread is a FreeRTOS thread.
|
/* Check whether the current thread is a FreeRTOS thread.
|
||||||
* This has to happen before the scheduler is signaled to exit
|
* This has to happen before the scheduler is signaled to exit
|
||||||
* its loop to prevent data races on the thread key. */
|
* its loop to prevent data races on the thread key. */
|
||||||
BaseType_t is_freertos_thread = prvIsFreeRTOSThread();
|
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( is_freertos_thread == pdTRUE )
|
if( xIsFreeRTOSThread == pdTRUE )
|
||||||
{
|
{
|
||||||
pxCurrentThread = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() );
|
pxCurrentThread = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() );
|
||||||
event_wait( pxCurrentThread->ev );
|
event_wait( pxCurrentThread->ev );
|
||||||
|
|
Loading…
Reference in a new issue