File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -346,18 +346,19 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
346346 taskDATA_GROUP_LOCK( &( ( pxQueue )->xTaskSpinlock ) ); \
347347 prvLockQueue( ( pxQueue ) ); \
348348 } while( 0 )
349- #define queueUNLOCK ( pxQueue , xYieldAPI ) \
350- do { \
351- prvUnlockQueue( ( pxQueue ) ); \
352- taskDATA_GROUP_UNLOCK( &( ( pxQueue )->xTaskSpinlock ) ); \
353- if( ( xYieldAPI ) == pdTRUE ) \
354- { \
355- taskYIELD_WITHIN_API(); \
356- } \
357- else \
358- { \
359- mtCOVERAGE_TEST_MARKER(); \
360- } \
349+ #define queueUNLOCK ( pxQueue , xYieldAPI ) \
350+ do { \
351+ BaseType_t xAlreadyYielded; \
352+ prvUnlockQueue( ( pxQueue ) ); \
353+ xAlreadyYielded = taskDATA_GROUP_UNLOCK( &( ( pxQueue )->xTaskSpinlock ) ); \
354+ if( ( xAlreadyYielded == pdFALSE ) && ( ( xYieldAPI ) == pdTRUE ) ) \
355+ { \
356+ taskYIELD_WITHIN_API(); \
357+ } \
358+ else \
359+ { \
360+ mtCOVERAGE_TEST_MARKER(); \
361+ } \
361362 } while( 0 )
362363#else /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
363364 #define queueLOCK ( pxQueue ) \
You can’t perform that action at this time.
0 commit comments