mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-13 16:27:43 -04:00
feat(freertos-smp): Update queueUNLOCK() to receive yield status
This commit is contained in:
parent
49b89b2f25
commit
1585b157d5
1 changed files with 13 additions and 12 deletions
25
queue.c
25
queue.c
|
@ -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 ) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue