feat(freertos-smp): Update queueUNLOCK() to receive yield status

This commit is contained in:
Sudeep Mohanty 2025-08-22 17:00:04 +02:00
parent 49b89b2f25
commit 1585b157d5

25
queue.c
View file

@ -346,18 +346,19 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
taskDATA_GROUP_LOCK( &( ( pxQueue )->xTaskSpinlock ) ); \ taskDATA_GROUP_LOCK( &( ( pxQueue )->xTaskSpinlock ) ); \
prvLockQueue( ( pxQueue ) ); \ prvLockQueue( ( pxQueue ) ); \
} while( 0 ) } while( 0 )
#define queueUNLOCK( pxQueue, xYieldAPI ) \ #define queueUNLOCK( pxQueue, xYieldAPI ) \
do { \ do { \
prvUnlockQueue( ( pxQueue ) ); \ BaseType_t xAlreadyYielded; \
taskDATA_GROUP_UNLOCK( &( ( pxQueue )->xTaskSpinlock ) ); \ prvUnlockQueue( ( pxQueue ) ); \
if( ( xYieldAPI ) == pdTRUE ) \ xAlreadyYielded = taskDATA_GROUP_UNLOCK( &( ( pxQueue )->xTaskSpinlock ) ); \
{ \ if( ( xAlreadyYielded == pdFALSE ) && ( ( xYieldAPI ) == pdTRUE ) ) \
taskYIELD_WITHIN_API(); \ { \
} \ taskYIELD_WITHIN_API(); \
else \ } \
{ \ else \
mtCOVERAGE_TEST_MARKER(); \ { \
} \ mtCOVERAGE_TEST_MARKER(); \
} \
} while( 0 ) } while( 0 )
#else /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */ #else /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
#define queueLOCK( pxQueue ) \ #define queueLOCK( pxQueue ) \