From cd894185e2e9e41c53549783cd6f445e1fc23a8d Mon Sep 17 00:00:00 2001 From: Rick Date: Sun, 15 Dec 2024 11:45:45 +0800 Subject: [PATCH] Regression Bug Fix: Fix Incorrect Return of MSVC-MingW portYIELD_FROM_ISR There is a regression issue introduced in https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/cfc268814a94a4deb8ddc8322b63ccae270a8669. This PR was intended to update MIT licensed header from v9 to v10. But it accidentally changed "portYIELD_FROM_ISR( x )" in MSVC-MingW/portmacro.h. It caused "portYIELD_FROM_ISR( x )" does not return correct value to "prvProcessSimulatedInterrupts". --- portable/MSVC-MingW/portmacro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portable/MSVC-MingW/portmacro.h b/portable/MSVC-MingW/portmacro.h index 288b7b0372d..eb94758be63 100644 --- a/portable/MSVC-MingW/portmacro.h +++ b/portable/MSVC-MingW/portmacro.h @@ -112,7 +112,7 @@ extern volatile BaseType_t xInsideInterrupt; /* Simulated interrupts return pdFALSE if no context switch should be performed, * or a non-zero number if a context switch should be performed. */ -#define portYIELD_FROM_ISR( x ) ( void ) x +#define portYIELD_FROM_ISR( x ) return x #define portEND_SWITCHING_ISR( x ) portYIELD_FROM_ISR( ( x ) ) void vPortCloseRunningThread( void * pvTaskToDelete,