From f59c1da4ef4afcd76c13dfff15fa2a7dc2c54c87 Mon Sep 17 00:00:00 2001 From: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> Date: Wed, 25 Dec 2024 18:23:16 +0800 Subject: [PATCH] Update portable/ThirdParty/xClang/XCOREAI/portmacro.h --- portable/ThirdParty/xClang/XCOREAI/portmacro.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/portable/ThirdParty/xClang/XCOREAI/portmacro.h b/portable/ThirdParty/xClang/XCOREAI/portmacro.h index 22d8a833a..3602e8b16 100644 --- a/portable/ThirdParty/xClang/XCOREAI/portmacro.h +++ b/portable/ThirdParty/xClang/XCOREAI/portmacro.h @@ -152,10 +152,11 @@ #define portASSERT_IF_IN_ISR() configASSERT( portCHECK_IF_IN_ISR() == 0 ) - #define portGET_ISR_LOCK( xCoreID ) ( (void)xCoreID, rtos_lock_acquire( 0 ) ) - #define portRELEASE_ISR_LOCK( xCoreID ) ( (void)xCoreID, rtos_lock_release( 0 ) ) - #define portGET_TASK_LOCK( xCoreID ) ( (void)xCoreID, rtos_lock_acquire( 1 ) ) - #define portRELEASE_TASK_LOCK( xCoreID ) ( (void)xCoreID, rtos_lock_release( 1 ) ) + #define portGET_ISR_LOCK( xCoreID ) do{ ( void )( xCoreID ); rtos_lock_acquire( 0 ) ); } while( 0 ) + #define portRELEASE_ISR_LOCK( xCoreID ) do{ ( void )( xCoreID ); rtos_lock_release( 0 ) ); } while( 0 ) + #define portGET_TASK_LOCK( xCoreID ) do{ ( void )( xCoreID ); rtos_lock_acquire( 1 ) ); } while( 0 ) + #define portRELEASE_TASK_LOCK( xCoreID ) do{ ( void )( xCoreID ); rtos_lock_release( 1 ) ); } while( 0 ) + void vTaskEnterCritical( void ); void vTaskExitCritical( void );