Skip to content

Commit cf55f11

Browse files
change(freertos/smp): Update queue.c locking
Updated queue.c to use granular locking - Added xTaskSpinlock and xISRSpinlock - Replaced critical section macros with data group locking macros such as taskENTER/EXIT_CRITICAL() with queueENTER/EXIT_CRITICAL(). - Added prvLockQueueForTasks() and prvUnlockQueueForTasks() as the granular locking equivalents to prvLockQueue() and prvUnlockQueue() respectively - Added missing critical sections to prvNotifyQueueSetContainer() Co-authored-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
1 parent 24b25da commit cf55f11

File tree

2 files changed

+358
-140
lines changed

2 files changed

+358
-140
lines changed

include/FreeRTOS.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,6 +3406,10 @@ typedef struct xSTATIC_QUEUE
34063406
UBaseType_t uxDummy8;
34073407
uint8_t ucDummy9;
34083408
#endif
3409+
3410+
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
3411+
portSPINLOCK_TYPE xDummySpinlock[ 2 ];
3412+
#endif /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
34093413
} StaticQueue_t;
34103414
typedef StaticQueue_t StaticSemaphore_t;
34113415

0 commit comments

Comments
 (0)