Skip to content

Commit 3176808

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 critical section macros such as taskENTER/EXIT_CRITICAL/_FROM_ISR() with queueENTER/EXIT_CRITICAL_FROM_ISR(). - Added vQueueEnterCritical/FromISR() and vQueueExitCritical/FromISR() which map to the data group critical section macros. - Added prvLockQueueForTasks() and prvUnlockQueueForTasks() as the granular locking equivalents to prvLockQueue() and prvUnlockQueue() respectively Co-authored-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
1 parent fd5037e commit 3176808

File tree

2 files changed

+149
-124
lines changed

2 files changed

+149
-124
lines changed

include/FreeRTOS.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,6 +3321,10 @@ typedef struct xSTATIC_QUEUE
33213321
UBaseType_t uxDummy8;
33223322
uint8_t ucDummy9;
33233323
#endif
3324+
3325+
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
3326+
portSPINLOCK_TYPE xDummySpinlock[ 2 ];
3327+
#endif /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
33243328
} StaticQueue_t;
33253329
typedef StaticQueue_t StaticSemaphore_t;
33263330

0 commit comments

Comments
 (0)