Skip to content

Commit 203b09e

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 <[email protected]>
1 parent 2cbed97 commit 203b09e

File tree

2 files changed

+359
-141
lines changed

2 files changed

+359
-141
lines changed

include/FreeRTOS.h

+4
Original file line numberDiff line numberDiff line change
@@ -3396,6 +3396,10 @@ typedef struct xSTATIC_QUEUE
33963396
UBaseType_t uxDummy8;
33973397
uint8_t ucDummy9;
33983398
#endif
3399+
3400+
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
3401+
portSPINLOCK_TYPE xDummySpinlock[ 2 ];
3402+
#endif /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
33993403
} StaticQueue_t;
34003404
typedef StaticQueue_t StaticSemaphore_t;
34013405

0 commit comments

Comments
 (0)