Skip to content

Commit 9350648

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 <[email protected]>
1 parent bca0ea0 commit 9350648

File tree

2 files changed

+450
-138
lines changed

2 files changed

+450
-138
lines changed

include/FreeRTOS.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3318,6 +3318,10 @@ typedef struct xSTATIC_QUEUE
33183318
UBaseType_t uxDummy8;
33193319
uint8_t ucDummy9;
33203320
#endif
3321+
3322+
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
3323+
portSPINLOCK_TYPE xDummySpinlock[ 2 ];
3324+
#endif /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
33213325
} StaticQueue_t;
33223326
typedef StaticQueue_t StaticSemaphore_t;
33233327

0 commit comments

Comments
 (0)