Skip to content

Commit fc1d166

Browse files
Dazza0sudeep-mohanty
authored andcommitted
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 taskLOCK/UNLOCK_DATA_GROUP(). - Added prvSuspendQueue() and prvResumeQueue() as the granular locking equivalents to prvLockQueue() and prvUnlockQueue() respectively - Added missing critical sections to prvNotifyQueueSetContainer()
1 parent 64e7e45 commit fc1d166

File tree

2 files changed

+347
-151
lines changed

2 files changed

+347
-151
lines changed

include/FreeRTOS.h

Lines changed: 4 additions & 0 deletions
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)