Convert some ports to use xTaskIncrementTick() in place of vTaskIncrementTick().

Move DSB instructions to before WFI instructions in line with ARM recommendations.
This commit is contained in:
Richard Barry 2013-06-06 15:46:40 +00:00
parent 4e9374ad90
commit 686d190798
27 changed files with 128 additions and 142 deletions

View file

@ -220,16 +220,11 @@ unsigned long ulSavedInterruptMask;
/* Increment the RTOS tick. */
ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR();
{
vTaskIncrementTick();
if( xTaskIncrementTick() != pdFALSE )
{
taskYIELD();
}
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask );
/* If we are using the pre-emptive scheduler then also request a
context switch as incrementing the tick could have unblocked a task. */
#if configUSE_PREEMPTION == 1
{
taskYIELD();
}
#endif
}

View file

@ -260,11 +260,10 @@ void interrupt vPortTickInterrupt( void )
portSAVE_CONTEXT();
/* Increment the tick ... */
vTaskIncrementTick();
/* ... then see if the new tick value has necessitated a
context switch. */
vTaskSwitchContext();
if( xTaskIncrementTick() != pdFALSE )
{
vTaskSwitchContext();
}
TFLG1 = 1;
@ -274,7 +273,7 @@ void interrupt vPortTickInterrupt( void )
}
#else
{
vTaskIncrementTick();
xTaskIncrementTick();
TFLG1 = 1;
}
#endif