From 866161519c69a3fdd0f817a04b925bbd0b8760b9 Mon Sep 17 00:00:00 2001 From: Jacques GUILLOU Date: Fri, 17 Feb 2023 11:33:32 +0100 Subject: [PATCH 1/2] Fix types in POSIX port Use TaskFunction_t and StackType_t as other ports do. --- portable/ThirdParty/GCC/Posix/port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index bd0842fbf5..474725b1ce 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -73,7 +73,7 @@ typedef struct THREAD { pthread_t pthread; - pdTASK_CODE pxCode; + TaskFunction_t pxCode; void * pvParams; BaseType_t xDying; struct event * ev; @@ -124,9 +124,9 @@ static void prvFatalError( const char * pcCall, /* * See header file for description. */ -portSTACK_TYPE * pxPortInitialiseStack( portSTACK_TYPE * pxTopOfStack, - portSTACK_TYPE * pxEndOfStack, - pdTASK_CODE pxCode, +portSTACK_TYPE * pxPortInitialiseStack( StackType_t * pxTopOfStack, + StackType_t * pxEndOfStack, + TaskFunction_t pxCode, void * pvParameters ) { Thread_t * thread; From bd3c52c1d036ff43c6b182c6964400ef0ec5c6e6 Mon Sep 17 00:00:00 2001 From: Jacques GUILLOU Date: Fri, 17 Feb 2023 12:36:01 +0100 Subject: [PATCH 2/2] Fix portTICK_RATE_MICROSECONDS in POSIX port --- portable/ThirdParty/GCC/Posix/portmacro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portable/ThirdParty/GCC/Posix/portmacro.h b/portable/ThirdParty/GCC/Posix/portmacro.h index a517387135..dbcbdc1041 100644 --- a/portable/ThirdParty/GCC/Posix/portmacro.h +++ b/portable/ThirdParty/GCC/Posix/portmacro.h @@ -71,7 +71,7 @@ typedef unsigned long TickType_t; #define portSTACK_GROWTH ( -1 ) #define portHAS_STACK_OVERFLOW_CHECKING ( 1 ) #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) -#define portTICK_RATE_MICROSECONDS ( ( portTickType ) 1000000 / configTICK_RATE_HZ ) +#define portTICK_RATE_MICROSECONDS ( ( TickType_t ) 1000000 / configTICK_RATE_HZ ) #define portBYTE_ALIGNMENT 8 /*-----------------------------------------------------------*/