mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-07-05 11:57:15 -04:00
Compare commits
11 commits
d00fdd8313
...
7b73d35554
Author | SHA1 | Date | |
---|---|---|---|
|
7b73d35554 | ||
|
da5dccf641 | ||
|
cb637b9318 | ||
|
e7773dc7be | ||
|
030afa1318 | ||
|
e87034f74a | ||
|
bb6b05497f | ||
|
eb7d86f0c3 | ||
|
308d050178 | ||
|
94c320c9e2 | ||
|
f836da4a8f |
|
@ -333,6 +333,7 @@ typedef enum
|
|||
portGET_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) &( ( pxDataGroup )->xISRSpinlock ) ); \
|
||||
/* Increment the critical nesting count */ \
|
||||
portINCREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
||||
/* Return the previous interrupt status */ \
|
||||
uxSavedInterruptStatus; \
|
||||
} )
|
||||
#endif /* #if ( portUSING_GRANULAR_LOCKS == 1 ) */
|
||||
|
@ -350,6 +351,7 @@ typedef enum
|
|||
do { \
|
||||
const BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID(); \
|
||||
configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) > 0U ); \
|
||||
/* Decrement the critical nesting count */ \
|
||||
portDECREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
||||
if( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 ) \
|
||||
{ \
|
||||
|
@ -382,7 +384,9 @@ typedef enum
|
|||
do { \
|
||||
const BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID(); \
|
||||
configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) > 0U ); \
|
||||
/* Decrement the critical nesting count */ \
|
||||
portDECREMENT_CRITICAL_NESTING_COUNT( xCoreID ); \
|
||||
/* Release the ISR spinlock */ \
|
||||
portRELEASE_SPINLOCK( xCoreID, ( portSPINLOCK_TYPE * ) &( pxDataGroup->xISRSpinlock ) ); \
|
||||
if( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 ) \
|
||||
{ \
|
||||
|
|
8
queue.c
8
queue.c
|
@ -339,6 +339,14 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
|||
prvUnlockQueue( ( pxQueue ) ); \
|
||||
portRELEASE_SPINLOCK( portGET_CORE_ID(), &( pxQueue->xTaskSpinlock ) ); \
|
||||
vTaskPreemptionEnable( NULL ); \
|
||||
if( ( xYieldAPI ) == pdTRUE ) \
|
||||
{ \
|
||||
taskYIELD_WITHIN_API(); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
mtCOVERAGE_TEST_MARKER(); \
|
||||
} \
|
||||
} while( 0 )
|
||||
#else /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
|
||||
#define queueLOCK( pxQueue ) \
|
||||
|
|
16
tasks.c
16
tasks.c
|
@ -5406,11 +5406,13 @@ BaseType_t xTaskIncrementTick( void )
|
|||
* SMP port. */
|
||||
configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 );
|
||||
|
||||
if( uxSchedulerSuspended != ( UBaseType_t ) 0U
|
||||
#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
|
||||
|| ( ( taskTASK_IS_RUNNING( pxCurrentTCBs[ xCoreID ] ) ) && ( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable > 0U ) )
|
||||
#endif
|
||||
)
|
||||
/* vTaskSwitchContext() must not be called with a task that has
|
||||
* preemption disabled. */
|
||||
#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
|
||||
configASSERT( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable == 0U );
|
||||
#endif
|
||||
|
||||
if( uxSchedulerSuspended != ( UBaseType_t ) 0U )
|
||||
{
|
||||
/* The scheduler is currently suspended or the task
|
||||
* has requested to not be preempted - do not allow
|
||||
|
@ -7498,11 +7500,11 @@ static void prvResetNextTaskUnblockTime( void )
|
|||
BaseType_t xYieldCurrentTask;
|
||||
|
||||
/* Get the xYieldPending stats inside the critical section. */
|
||||
#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
|
||||
#if ( portUSING_GRANULAR_LOCKS == 1 )
|
||||
xYieldCurrentTask = xTaskUnlockCanYield();
|
||||
#else
|
||||
xYieldCurrentTask = xYieldPendings[ xCoreID ];
|
||||
#endif /* configUSE_TASK_PREEMPTION_DISABLE */
|
||||
#endif /* #if ( portUSING_GRANULAR_LOCKS == 1 ) */
|
||||
|
||||
kernelRELEASE_ISR_LOCK( xCoreID );
|
||||
kernelRELEASE_TASK_LOCK( xCoreID );
|
||||
|
|
Loading…
Reference in a new issue