Skip to content

Commit

Permalink
Revert timer tick function
Browse files Browse the repository at this point in the history
  • Loading branch information
chinglee-iot committed Jan 10, 2024
1 parent a624921 commit 8cdc1ad
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions portable/ThirdParty/GCC/Posix/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 );
}

Expand Down

0 comments on commit 8cdc1ad

Please sign in to comment.