mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-07-05 11:57:15 -04:00
Compare commits
8 commits
35987eb280
...
ed90c6ac80
Author | SHA1 | Date | |
---|---|---|---|
|
ed90c6ac80 | ||
|
8c2dec097b | ||
|
42fce69365 | ||
|
7f2c159dee | ||
|
1b6b659c68 | ||
|
9ad6c81b31 | ||
|
fd47eba3c7 | ||
|
322512c65b |
|
@ -298,18 +298,12 @@ typedef enum
|
||||||
vTaskPreemptionDisable( NULL ); \
|
vTaskPreemptionDisable( NULL ); \
|
||||||
{ \
|
{ \
|
||||||
const BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID(); \
|
const BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID(); \
|
||||||
if( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0U ) { \
|
|
||||||
/* Task spinlock is always taken first */ \
|
/* Task spinlock is always taken first */ \
|
||||||
portGET_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxTaskSpinlock ); \
|
portGET_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxTaskSpinlock ); \
|
||||||
/* Disable interrupts */ \
|
/* Disable interrupts */ \
|
||||||
portDISABLE_INTERRUPTS(); \
|
portDISABLE_INTERRUPTS(); \
|
||||||
/* Take the ISR spinlock next */ \
|
/* Take the ISR spinlock next */ \
|
||||||
portGET_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxISRSpinlock ); \
|
portGET_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxISRSpinlock ); \
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
mtCOVERAGE_TEST_MARKER(); \
|
|
||||||
} \
|
|
||||||
/* Increment the critical nesting count */ \
|
/* Increment the critical nesting count */ \
|
||||||
portINCREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
portINCREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
||||||
} \
|
} \
|
||||||
|
@ -349,16 +343,16 @@ typedef enum
|
||||||
do { \
|
do { \
|
||||||
const BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID(); \
|
const BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID(); \
|
||||||
configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) > 0U ); \
|
configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) > 0U ); \
|
||||||
/* Decrement the critical nesting count */ \
|
|
||||||
portDECREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
|
||||||
if( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 ) \
|
|
||||||
{ \
|
|
||||||
/* Release the ISR spinlock */ \
|
/* Release the ISR spinlock */ \
|
||||||
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxISRSpinlock ); \
|
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxISRSpinlock ); \
|
||||||
/* Enable interrupts */ \
|
|
||||||
portENABLE_INTERRUPTS(); \
|
|
||||||
/* Release the task spinlock */ \
|
/* Release the task spinlock */ \
|
||||||
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxTaskSpinlock ); \
|
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxTaskSpinlock ); \
|
||||||
|
/* Decrement the critical nesting count */ \
|
||||||
|
portDECREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
||||||
|
/* Enable interrupts only if the critical nesting count is 0 */ \
|
||||||
|
if( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 ) \
|
||||||
|
{ \
|
||||||
|
portENABLE_INTERRUPTS(); \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
|
|
Loading…
Reference in a new issue