Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRTOS/FreeRTOS-Kernel.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChing-Hsin,Lee <chinglee@amazon.com>2024-01-10 08:20:51 +0300
committerPaul Bartell <paul.bartell@gmail.com>2024-01-11 21:53:54 +0300
commit3dade5b5a5a1378ccab80718a1f501f7485a0fa1 (patch)
treeff9408207c8ed34469f8e5b5d45224979c5cfdb0
parent7ba4124c785e400cb0e8c3c17a49f390e90ba77e (diff)
UPdate format
-rw-r--r--portable/ThirdParty/GCC/Posix/port.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c
index 391abe4ff..d91255796 100644
--- a/portable/ThirdParty/GCC/Posix/port.c
+++ b/portable/ThirdParty/GCC/Posix/port.c
@@ -106,7 +106,7 @@ static volatile BaseType_t uxCriticalNesting;
static BaseType_t xSchedulerEnd = pdFALSE;
static pthread_t hTimerTickThread;
static uint64_t prvStartTimeNs;
-static List_t xThreadList; /* The list to track all the pthreads which are not deleted. */
+static List_t xThreadList; /* The list to track all the pthreads which are not deleted. */
/*-----------------------------------------------------------*/
static void prvSetupSignalsAndSchedulerPolicy( void );
@@ -250,7 +250,7 @@ BaseType_t xPortStartScheduler( void )
for( pxIterator = listGET_HEAD_ENTRY( &xThreadList ); pxIterator != pxEndMarker; pxIterator = listGET_NEXT( pxIterator ) )
{
- Thread_t *pxThread = ( Thread_t * ) listGET_LIST_ITEM_OWNER( pxIterator );
+ Thread_t * pxThread = ( Thread_t * ) listGET_LIST_ITEM_OWNER( pxIterator );
pthread_cancel( pxThread->pthread );
pthread_join( pxThread->pthread, NULL );
@@ -377,9 +377,9 @@ static uint64_t prvGetTimeNs( void )
* to adjust timing according to full demo requirements */
/* static uint64_t prvTickCount; */
-static void* prvTimerTickHandler(void *arg)
+static void * prvTimerTickHandler( void * arg )
{
- for(;;)
+ for( ; ; )
{
/*
* signal to the active task to cause tick handling or
@@ -389,13 +389,15 @@ static void* prvTimerTickHandler(void *arg)
Thread_t * thread;
hCurrentTask = xTaskGetCurrentTaskHandle();
+
if( hCurrentTask != NULL )
{
thread = prvGetThreadFromTask( hCurrentTask );
pthread_kill( thread->pthread, SIGALRM );
}
+
usleep( portTICK_RATE_MICROSECONDS );
- pthread_testcancel();
+ pthread_testcancel();
}
}