Skip to content

Commit fbbed10

Browse files
Dazza0sudeep-mohanty
authored andcommitted
change(freertos/smp): Update stream_buffer.c locking
Updated stream_buffer.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 prvSuspendStreamBuffer() and prvResumeStreamBuffer() to suspend the stream buffer when executing non-deterministic code.
1 parent 2d19759 commit fbbed10

File tree

2 files changed

+142
-50
lines changed

2 files changed

+142
-50
lines changed

include/FreeRTOS.h

+3
Original file line numberDiff line numberDiff line change
@@ -3488,6 +3488,9 @@ typedef struct xSTATIC_STREAM_BUFFER
34883488
void * pvDummy5[ 2 ];
34893489
#endif
34903490
UBaseType_t uxDummy6;
3491+
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
3492+
portSPINLOCK_TYPE xDummySpinlock[ 2 ];
3493+
#endif /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
34913494
} StaticStreamBuffer_t;
34923495

34933496
/* Message buffers are built on stream buffers. */

0 commit comments

Comments
 (0)