From 8cdc1ada047b7ace6ef4a76d7600a04333e0e24c Mon Sep 17 00:00:00 2001 From: "Ching-Hsin,Lee" Date: Wed, 10 Jan 2024 05:48:35 +0000 Subject: [PATCH] Revert timer tick function --- portable/ThirdParty/GCC/Posix/port.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index f1bf2365ed3..4653d6f1963 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -255,7 +255,7 @@ BaseType_t xPortStartScheduler( void ) Thread_t * pxThread = ( Thread_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); pthread_cancel( pxThread->pthread ); - event_signal( pxThread->pthread ); + event_signal( pxThread->ev ); pthread_join( pxThread->pthread, NULL ); event_delete( pxThread->ev ); } @@ -387,17 +387,8 @@ static void * prvTimerTickHandler( void * arg ) * signal to the active task to cause tick handling or * preemption (if enabled) */ - TaskHandle_t hCurrentTask; - Thread_t * thread; - - hCurrentTask = xTaskGetCurrentTaskHandle(); - - if( hCurrentTask != NULL ) - { - thread = prvGetThreadFromTask( hCurrentTask ); - pthread_kill( thread->pthread, SIGALRM ); - } - + Thread_t * thread = prvGetThreadFromTask( xTaskGetCurrentTaskHandle() ); + pthread_kill( thread->pthread, SIGALRM ); usleep( portTICK_RATE_MICROSECONDS ); }