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

@ -195,10 +195,11 @@ is being used. */
static void __interrupt __far prvPreemptiveTick( void )
{
/* Get the scheduler to update the task states following the tick. */
vTaskIncrementTick();
/* Switch in the context of the next task to be run. */
portSWITCH_CONTEXT();
if( xTaskIncrementTick() != pdFALSE )
{
/* Switch in the context of the next task to be run. */
portSWITCH_CONTEXT();
}
/* Reset the PIC ready for the next time. */
portRESET_PIC();
@ -208,7 +209,7 @@ is being used. */
{
/* Same as preemptive tick, but the cooperative scheduler is being used
so we don't have to switch in the context of the next task. */
vTaskIncrementTick();
xTaskIncrementTick();
portRESET_PIC();
}
#endif

View file

@ -216,10 +216,11 @@ scheduler is being used. */
static void __interrupt __far prvPreemptiveTick( void )
{
/* Get the scheduler to update the task states following the tick. */
vTaskIncrementTick();
/* Switch in the context of the next task to be run. */
portSWITCH_CONTEXT();
if( xTaskIncrementTick() != pdFALSE )
{
/* Switch in the context of the next task to be run. */
portSWITCH_CONTEXT();
}
/* Reset the PIC ready for the next time. */
prvPortResetPIC();
@ -229,7 +230,7 @@ scheduler is being used. */
{
/* Same as preemptive tick, but the cooperative scheduler is being used
so we don't have to switch in the context of the next task. */
vTaskIncrementTick();
xTaskIncrementTick();
prvPortResetPIC();
}
#endif