mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-07-05 20:07:17 -04:00
Compare commits
8 commits
ed90c6ac80
...
35987eb280
Author | SHA1 | Date | |
---|---|---|---|
|
35987eb280 | ||
|
71c4c6d89a | ||
|
7f8416db94 | ||
|
ab8600effc | ||
|
3184393420 | ||
|
c712a63ce8 | ||
|
e584634e1f | ||
|
21382c3def |
|
@ -298,12 +298,18 @@ 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 ); \
|
||||||
} \
|
} \
|
||||||
|
@ -343,16 +349,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 ); \
|
||||||
/* Release the ISR spinlock */ \
|
|
||||||
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxISRSpinlock ); \
|
|
||||||
/* Release the task spinlock */ \
|
|
||||||
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxTaskSpinlock ); \
|
|
||||||
/* Decrement the critical nesting count */ \
|
/* Decrement the critical nesting count */ \
|
||||||
portDECREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
portDECREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
||||||
/* Enable interrupts only if the critical nesting count is 0 */ \
|
|
||||||
if( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 ) \
|
if( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 ) \
|
||||||
{ \
|
{ \
|
||||||
|
/* Release the ISR spinlock */ \
|
||||||
|
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxISRSpinlock ); \
|
||||||
|
/* Enable interrupts */ \
|
||||||
portENABLE_INTERRUPTS(); \
|
portENABLE_INTERRUPTS(); \
|
||||||
|
/* Release the task spinlock */ \
|
||||||
|
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) pxTaskSpinlock ); \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
|
|
Loading…
Reference in a new issue