diff options
author | Ching-Hsin,Lee <chinglee@amazon.com> | 2024-01-10 08:48:35 +0300 |
---|---|---|
committer | Paul Bartell <paul.bartell@gmail.com> | 2024-01-11 21:53:54 +0300 |
commit | b6c0c51cbe74429fffb0ba48551907f4bb94eed6 (patch) | |
tree | b8b78832d043d759b27a55957f1f60132a4d4759 | |
parent | 5ed9c7022b9c95c33ca72ebbab40397f9386f24f (diff) |
Revert timer tick function
-rw-r--r-- | portable/ThirdParty/GCC/Posix/port.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index f1bf2365e..4653d6f19 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 ); } |