From 5f2cc25b17bfecc732f215bf6aac6b3d77bd55a8 Mon Sep 17 00:00:00 2001 From: "1294644079@qq.com" <1294644079@qq.com> Date: Sat, 18 Apr 2026 23:35:43 +0800 Subject: [PATCH 1/4] fix stream/message buffer type and timeout in example --- include/message_buffer.h | 6 +++--- include/stream_buffer.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/message_buffer.h b/include/message_buffer.h index 9fb97ffd0..cac6db3ba 100644 --- a/include/message_buffer.h +++ b/include/message_buffer.h @@ -560,14 +560,14 @@ typedef StreamBufferHandle_t MessageBufferHandle_t; * * Example use: * @code{c} - * void vAFunction( MessageBuffer_t xMessageBuffer ) + * void vAFunction( MessageBufferHandle_t xMessageBuffer ) * { * uint8_t ucRxData[ 20 ]; * size_t xReceivedBytes; * const TickType_t xBlockTime = pdMS_TO_TICKS( 20 ); * * // Receive the next message from the message buffer. Wait in the Blocked - * // state (so not using any CPU processing time) for a maximum of 100ms for + * // state (so not using any CPU processing time) for a maximum of 20ms for * // a message to become available. * xReceivedBytes = xMessageBufferReceive( xMessageBuffer, * ( void * ) ucRxData, @@ -655,7 +655,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t; * Example use: * @code{c} * // A message buffer that has already been created. - * MessageBuffer_t xMessageBuffer; + * MessageBufferHandle_t xMessageBuffer; * * void vAnInterruptServiceRoutine( void ) * { diff --git a/include/stream_buffer.h b/include/stream_buffer.h index b0093fc80..577420c44 100644 --- a/include/stream_buffer.h +++ b/include/stream_buffer.h @@ -760,7 +760,7 @@ size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer, * * Example use: * @code{c} - * void vAFunction( StreamBuffer_t xStreamBuffer ) + * void vAFunction( StreamBufferHandle_t xStreamBuffer ) * { * uint8_t ucRxData[ 20 ]; * size_t xReceivedBytes; @@ -768,7 +768,7 @@ size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer, * * // Receive up to another sizeof( ucRxData ) bytes from the stream buffer. * // Wait in the Blocked state (so not using any CPU processing time) for a - * // maximum of 100ms for the full sizeof( ucRxData ) number of bytes to be + * // maximum of 20ms for the full sizeof( ucRxData ) number of bytes to be * // available. * xReceivedBytes = xStreamBufferReceive( xStreamBuffer, * ( void * ) ucRxData, @@ -840,7 +840,7 @@ size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, * Example use: * @code{c} * // A stream buffer that has already been created. - * StreamBuffer_t xStreamBuffer; + * StreamBufferHandle_t xStreamBuffer; * * void vAnInterruptServiceRoutine( void ) * { @@ -1218,7 +1218,7 @@ UBaseType_t uxStreamBufferGetStreamBufferNotificationIndex( StreamBufferHandle_t * stream_buffer.h * * @code{c} - * void vStreamBufferSetStreamBufferNotificationIndex ( StreamBuffer_t xStreamBuffer, UBaseType_t uxNotificationIndex ); + * void vStreamBufferSetStreamBufferNotificationIndex ( StreamBufferHandle_t xStreamBuffer, UBaseType_t uxNotificationIndex ); * @endcode * * Set the task notification index used for the supplied stream buffer. From 587fe6df0d89459bcf11e018646fc0b3a61e69f2 Mon Sep 17 00:00:00 2001 From: Kody Stribrny Date: Wed, 22 Apr 2026 11:05:16 -0700 Subject: [PATCH 2/4] Fix long path errors on Windows demos Both the WIN32-MSVC and WIN32-MingW demos are failing due to long file paths. This is because of a transitive dependency path which is submodules further extending the path length. Enabling windows long path support fixes this. --- .github/workflows/kernel-demos.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/kernel-demos.yml b/.github/workflows/kernel-demos.yml index 9371e9cea..e120aceac 100644 --- a/.github/workflows/kernel-demos.yml +++ b/.github/workflows/kernel-demos.yml @@ -13,6 +13,10 @@ jobs: name: WIN32 MSVC runs-on: windows-latest steps: + - name: Enable long paths on Windows + if: runner.os == 'Windows' + run: git config --system core.longpaths true + - name: Checkout the FreeRTOS/FreeRTOS Repository uses: actions/checkout@v4.1.1 with: @@ -42,6 +46,10 @@ jobs: name: WIN32 MingW runs-on: windows-latest steps: + - name: Enable long paths on Windows + if: runner.os == 'Windows' + run: git config --system core.longpaths true + - name: Checkout the FreeRTOS/FreeRTOS Repository uses: actions/checkout@v4.1.1 with: From d1f551e2539ef7324013aebf22cd430a690e0d42 Mon Sep 17 00:00:00 2001 From: Ramesh Date: Wed, 22 Apr 2026 16:49:12 +0530 Subject: [PATCH 3/4] - Fixed the wrong pre-processor comment and function parameters --- include/list.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/list.h b/include/list.h index b6e0d34f4..f9a8c00f6 100644 --- a/include/list.h +++ b/include/list.h @@ -92,7 +92,7 @@ */ #ifndef configLIST_VOLATILE #define configLIST_VOLATILE -#endif /* configSUPPORT_CROSS_MODULE_OPTIMISATION */ +#endif /* configLIST_VOLATILE */ /* *INDENT-OFF* */ #ifdef __cplusplus @@ -191,7 +191,7 @@ typedef struct xLIST * Access macro to get the owner of a list item. The owner of a list item * is the object (usually a TCB) that contains the list item. * - * \page listGET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER + * \page listGET_LIST_ITEM_OWNER listGET_LIST_ITEM_OWNER * \ingroup LinkedList */ #define listGET_LIST_ITEM_OWNER( pxListItem ) ( ( pxListItem )->pvOwner ) @@ -310,7 +310,7 @@ typedef struct xLIST * Remove an item from a list. The list item has a pointer to the list that * it is in, so only the list item need be passed into the function. * - * @param uxListRemove The item to be removed. The item will remove itself from + * @param pxItemToRemove The item to be removed. The item will remove itself from * the list pointed to by it's pxContainer parameter. * * @return The number of items that remain in the list after the list item has @@ -491,7 +491,7 @@ void vListInsertEnd( List_t * const pxList, * Remove an item from a list. The list item has a pointer to the list that * it is in, so only the list item need be passed into the function. * - * @param uxListRemove The item to be removed. The item will remove itself from + * @param pxItemToRemove The item to be removed. The item will remove itself from * the list pointed to by it's pxContainer parameter. * * @return The number of items that remain in the list after the list item has From a8c9d351520d43bd94692361bd67b6d798985c98 Mon Sep 17 00:00:00 2001 From: Anubhav Rawal Date: Wed, 6 May 2026 16:11:51 -0700 Subject: [PATCH 4/4] Fix undefined behavior from signed left-shift in MSVC-MingW port (#1411) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace `( 1 << n )` with `( 1UL << n )` in all left-shift expressions in portable/MSVC-MingW/port.c. Shifting a signed int by >= 31 is undefined behavior per ISO C11 ยง6.5.7. --- portable/MSVC-MingW/port.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/portable/MSVC-MingW/port.c b/portable/MSVC-MingW/port.c index d992c4d3c..40458682b 100644 --- a/portable/MSVC-MingW/port.c +++ b/portable/MSVC-MingW/port.c @@ -408,7 +408,7 @@ static void prvProcessSimulatedInterrupts( void ) /* Create a pending tick to ensure the first task is started as soon as * this thread pends. */ - ulPendingInterrupts |= ( 1 << portINTERRUPT_TICK ); + ulPendingInterrupts |= ( 1UL << portINTERRUPT_TICK ); SetEvent( pvInterruptEvent ); while( xPortRunning == pdTRUE ) @@ -447,7 +447,7 @@ static void prvProcessSimulatedInterrupts( void ) if( ulIsrHandler[ i ]() != pdFALSE ) { /* A bit mask is used purely to help debugging. */ - ulSwitchRequired |= ( 1 << i ); + ulSwitchRequired |= ( 1UL << i ); } } @@ -580,7 +580,7 @@ void vPortCloseRunningThread( void * pvTaskToDelete, if( pvInterruptEventMutex != NULL ) { WaitForSingleObject( pvInterruptEventMutex, INFINITE ); - ulPendingInterrupts |= ( 1 << portINTERRUPT_YIELD ); + ulPendingInterrupts |= ( 1UL << portINTERRUPT_YIELD ); ReleaseMutex( pvInterruptEventMutex ); } @@ -604,7 +604,7 @@ void vPortGenerateSimulatedInterrupt( uint32_t ulInterruptNumber ) if( ( ulInterruptNumber < portMAX_INTERRUPTS ) && ( pvInterruptEventMutex != NULL ) ) { WaitForSingleObject( pvInterruptEventMutex, INFINITE ); - ulPendingInterrupts |= ( 1 << ulInterruptNumber ); + ulPendingInterrupts |= ( 1UL << ulInterruptNumber ); /* The simulated interrupt is now held pending, but don't actually * process it yet if this call is within a critical section. It is @@ -645,7 +645,7 @@ void vPortGenerateSimulatedInterruptFromWindowsThread( uint32_t ulInterruptNumbe /* Pending a user defined interrupt to be handled in simulated interrupt * handler thread. */ - ulPendingInterrupts |= ( 1 << ulInterruptNumber ); + ulPendingInterrupts |= ( 1UL << ulInterruptNumber ); /* The interrupt is now pending - notify the simulated interrupt * handler thread. Must be outside of a critical section to get here so