feat(freertos): Add SMP critical section changes to FreeRTOS v10.5.1

This commit adds the SMP critical section changes to the v10.5.1 kernel. These
changes are temporarily documented in the `idf_changes.md` document. This
commit...

- Adds granular spinlocks to each data group (e.g., kernel, queues, event_groups etc.)
- Updates critical section macros to use those spinlocks
- Add missing critical sections required in SMP
This commit is contained in:
Darian Leung
2023-09-08 00:29:57 +08:00
parent db64e51e53
commit 49af70506a
9 changed files with 1857 additions and 1200 deletions

View File

@@ -1371,6 +1371,7 @@ typedef struct xSTATIC_QUEUE
UBaseType_t uxDummy8;
uint8_t ucDummy9;
#endif
portMUX_TYPE xDummyQueueLock;
} StaticQueue_t;
typedef StaticQueue_t StaticSemaphore_t;
@@ -1400,6 +1401,7 @@ typedef struct xSTATIC_EVENT_GROUP
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
uint8_t ucDummy4;
#endif
portMUX_TYPE xDummyEventGroupLock;
} StaticEventGroup_t;
/*
@@ -1454,6 +1456,7 @@ typedef struct xSTATIC_STREAM_BUFFER
#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
void * pvDummy5[ 2 ];
#endif
portMUX_TYPE xDummyStreamBufferLock;
} StaticStreamBuffer_t;
/* Message buffers are built on stream buffers. */

View File

@@ -220,8 +220,9 @@ typedef enum
* \defgroup taskENTER_CRITICAL taskENTER_CRITICAL
* \ingroup SchedulerControl
*/
#define taskENTER_CRITICAL() portENTER_CRITICAL()
#define taskENTER_CRITICAL( x ) portENTER_CRITICAL( x )
#define taskENTER_CRITICAL_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
#define taskENTER_CRITICAL_ISR( x ) portENTER_CRITICAL_ISR( x )
/**
* task. h
@@ -235,8 +236,9 @@ typedef enum
* \defgroup taskEXIT_CRITICAL taskEXIT_CRITICAL
* \ingroup SchedulerControl
*/
#define taskEXIT_CRITICAL() portEXIT_CRITICAL()
#define taskEXIT_CRITICAL( x ) portEXIT_CRITICAL( x )
#define taskEXIT_CRITICAL_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( x )
#define taskEXIT_CRITICAL_ISR( x ) portEXIT_CRITICAL_ISR( x )
/**
* task. h