mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Convert more ports to use xTaskIncrementTick() in place of vTaskIncrementTick().
This commit is contained in:
parent
15ec6c87f7
commit
f904d26957
|
@ -362,7 +362,7 @@ unsigned char ucHighByte, ucLowByte;
|
|||
*/
|
||||
__interrupt void SIG_OUTPUT_COMPARE1A( void )
|
||||
{
|
||||
vTaskIncrementTick();
|
||||
xTaskIncrementTick();
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -67,7 +67,7 @@ EXTERN SIG_UART_DATA
|
|||
; ---------------------------
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN pxCurrentTCB
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN xTaskIncrementTick
|
||||
EXTERN uxCriticalNesting
|
||||
|
||||
; Functions implemented in this file
|
||||
|
@ -243,7 +243,7 @@ vPortYield:
|
|||
|
||||
vPortYieldFromTick:
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
call vTaskIncrementTick ; Call the timer tick function.
|
||||
call xTaskIncrementTick ; Call the timer tick function.
|
||||
call vTaskSwitchContext ; Call the scheduler.
|
||||
portRESTORE_CONTEXT ; Restore the context of whichever task the ...
|
||||
ret ; ... scheduler decided should run.
|
||||
|
|
|
@ -220,7 +220,7 @@ static void vTick( void )
|
|||
/* Because FreeRTOS is not supposed to run with nested interrupts, put all OS
|
||||
calls in a critical section . */
|
||||
portENTER_CRITICAL();
|
||||
vTaskIncrementTick();
|
||||
xTaskIncrementTick();
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
/* Restore the context of the "elected task". */
|
||||
|
|
|
@ -226,7 +226,7 @@ void vPortEndScheduler( void )
|
|||
/* Increment the tick count - which may wake some tasks but as the
|
||||
preemptive scheduler is not being used any woken task is not given
|
||||
processor time no matter what its priority. */
|
||||
vTaskIncrementTick();
|
||||
xTaskIncrementTick();
|
||||
|
||||
/* Clear the PIT interrupt. */
|
||||
ulDummy = AT91C_BASE_PITC->PITC_PIVR;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
CODE32
|
||||
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN xTaskIncrementTick
|
||||
|
||||
PUBLIC vPortYieldProcessor
|
||||
PUBLIC vPortPreemptiveTick
|
||||
|
@ -91,7 +91,7 @@ vPortYieldProcessor:
|
|||
vPortPreemptiveTick:
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
|
||||
LDR R0, =vTaskIncrementTick ; Increment the tick count - this may wake a task.
|
||||
LDR R0, =xTaskIncrementTick ; Increment the tick count - this may wake a task.
|
||||
mov lr, pc
|
||||
BX R0
|
||||
LDR R0, =vTaskSwitchContext ; Select the next task to execute.
|
||||
|
|
|
@ -237,11 +237,10 @@ volatile unsigned long ulDummy;
|
|||
/* Increment the tick count - which may wake some tasks but as the
|
||||
preemptive scheduler is not being used any woken task is not given
|
||||
processor time no matter what its priority. */
|
||||
vTaskIncrementTick();
|
||||
|
||||
#if configUSE_PREEMPTION == 1
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
vTaskSwitchContext();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Clear the PIT interrupt. */
|
||||
ulDummy = AT91C_BASE_PITC->PITC_PIVR;
|
||||
|
|
|
@ -244,7 +244,7 @@ void vPortEndScheduler( void )
|
|||
/* Increment the tick count - which may wake some tasks but as the
|
||||
preemptive scheduler is not being used any woken task is not given
|
||||
processor time no matter what its priority. */
|
||||
vTaskIncrementTick();
|
||||
xTaskIncrementTick();
|
||||
|
||||
/* Ready for the next interrupt. */
|
||||
T0IR = portTIMER_MATCH_ISR_BIT;
|
||||
|
@ -259,12 +259,13 @@ void vPortEndScheduler( void )
|
|||
void vPortPreemptiveTick( void )
|
||||
{
|
||||
/* Increment the tick counter. */
|
||||
vTaskIncrementTick();
|
||||
|
||||
/* The new tick value might unblock a task. Ensure the highest task that
|
||||
is ready to execute is the task that will execute when the tick ISR
|
||||
exits. */
|
||||
vTaskSwitchContext();
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* The new tick value might unblock a task. Ensure the highest task that
|
||||
is ready to execute is the task that will execute when the tick ISR
|
||||
exits. */
|
||||
vTaskSwitchContext();
|
||||
}
|
||||
|
||||
/* Ready for the next interrupt. */
|
||||
T0IR = portTIMER_MATCH_ISR_BIT;
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
CODE32
|
||||
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN vPortPreemptiveTick
|
||||
|
||||
PUBLIC vPortPreemptiveTickEntry
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#include "FreeRTOSConfig.h"
|
||||
#include "portasm.h"
|
||||
|
||||
IMPORT vTaskIncrementTick
|
||||
IMPORT xTaskIncrementTick
|
||||
IMPORT vTaskSwitchContext
|
||||
IMPORT vPortSetupTimerInterrupt
|
||||
|
||||
|
@ -95,7 +95,7 @@
|
|||
vTickISR:
|
||||
portSAVE_CONTEXT
|
||||
|
||||
call #vTaskIncrementTick
|
||||
call #xTaskIncrementTick
|
||||
|
||||
#if configUSE_PREEMPTION == 1
|
||||
call #vTaskSwitchContext
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
#include "FreeRTOSConfig.h"
|
||||
#include "data_model.h"
|
||||
|
||||
IMPORT vTaskIncrementTick
|
||||
IMPORT xTaskIncrementTick
|
||||
IMPORT vTaskSwitchContext
|
||||
IMPORT vPortSetupTimerInterrupt
|
||||
IMPORT pxCurrentTCB
|
||||
|
@ -130,7 +130,7 @@ vPortTickISR:
|
|||
push.w sr
|
||||
portSAVE_CONTEXT
|
||||
|
||||
calla #vTaskIncrementTick
|
||||
calla #xTaskIncrementTick
|
||||
|
||||
#if configUSE_PREEMPTION == 1
|
||||
calla #vTaskSwitchContext
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
PUBLIC vPortTickISR
|
||||
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN xTaskIncrementTick
|
||||
|
||||
; FreeRTOS yield handler. This is installed as the BRK software interrupt
|
||||
; handler.
|
||||
|
@ -87,7 +87,7 @@ vPortStartFirstTask:
|
|||
vPortTickISR:
|
||||
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
call vTaskIncrementTick ; Call the timer tick function.
|
||||
call xTaskIncrementTick ; Call the timer tick function.
|
||||
#if configUSE_PREEMPTION == 1
|
||||
call vTaskSwitchContext ; Call the scheduler to select the next task.
|
||||
#endif
|
||||
|
|
|
@ -304,17 +304,13 @@ __interrupt static void prvTickISR( void )
|
|||
necessitates. */
|
||||
__set_interrupt_level( configMAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||
{
|
||||
vTaskIncrementTick();
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
}
|
||||
__set_interrupt_level( configKERNEL_INTERRUPT_PRIORITY );
|
||||
|
||||
/* Only select a new task if the preemptive scheduler is being used. */
|
||||
#if( configUSE_PREEMPTION == 1 )
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
{
|
||||
/* The CPU woke because of a tick. */
|
||||
|
|
|
@ -225,7 +225,7 @@ __arm __irq void vPortNonPreemptiveTick( void )
|
|||
/* Increment the tick count - which may wake some tasks but as the
|
||||
preemptive scheduler is not being used any woken task is not given
|
||||
processor time no matter what its priority. */
|
||||
vTaskIncrementTick();
|
||||
xTaskIncrementTick();
|
||||
|
||||
/* Clear the interrupt in the watchdog and EIC. */
|
||||
WDG->SR = 0x0000;
|
||||
|
@ -238,12 +238,11 @@ keyword. */
|
|||
void vPortPreemptiveTick( void )
|
||||
{
|
||||
/* Increment the tick counter. */
|
||||
vTaskIncrementTick();
|
||||
|
||||
/* The new tick value might unblock a task. Ensure the highest task that
|
||||
is ready to execute is the task that will execute when the tick ISR
|
||||
exits. */
|
||||
vTaskSwitchContext();
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* Select a new task to execute. */
|
||||
vTaskSwitchContext();
|
||||
}
|
||||
|
||||
/* Clear the interrupt in the watchdog and EIC. */
|
||||
WDG->SR = 0x0000;
|
||||
|
|
|
@ -209,14 +209,11 @@ void vPortEndScheduler( void )
|
|||
__arm void vPortPreemptiveTick( void )
|
||||
{
|
||||
/* Increment the tick counter. */
|
||||
vTaskIncrementTick();
|
||||
|
||||
/* The new tick value might unblock a task. Ensure the highest task that
|
||||
is ready to execute is the task that will execute when the tick ISR
|
||||
exits. */
|
||||
#if configUSE_PREEMPTION == 1
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* Select a new task to execute. */
|
||||
vTaskSwitchContext();
|
||||
#endif
|
||||
}
|
||||
|
||||
TB_ClearITPendingBit( TB_IT_Update );
|
||||
}
|
||||
|
|
|
@ -324,16 +324,11 @@ keyword. */
|
|||
{
|
||||
{
|
||||
/* Increment the tick counter. */
|
||||
vTaskIncrementTick();
|
||||
|
||||
#if configUSE_PREEMPTION == 1
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* The new tick value might unblock a task. Ensure the highest task that
|
||||
is ready to execute is the task that will execute when the tick ISR
|
||||
exits. */
|
||||
/* Select a new task to execute. */
|
||||
vTaskSwitchContext();
|
||||
}
|
||||
#endif /* configUSE_PREEMPTION. */
|
||||
|
||||
/* Clear the interrupt in the watchdog. */
|
||||
WDG->SR &= ~0x0001;
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
; Functions used by scheduler
|
||||
;------------------------------------------------------------------------------
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN xTaskIncrementTick
|
||||
|
||||
; Variables used by scheduler
|
||||
;------------------------------------------------------------------------------
|
||||
|
@ -278,7 +278,7 @@ MD_INTTM0EQ0:
|
|||
stsr 1,lp
|
||||
st.w lp,0[sp] ; store EIPSW to stack
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
jarl vTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl xTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl vTaskSwitchContext,lp ; Call the scheduler.
|
||||
portRESTORE_CONTEXT ; Restore the context of whichever task the ...
|
||||
; ... scheduler decided should run.
|
||||
|
@ -297,7 +297,7 @@ MD_INTTM0EQ0:
|
|||
prepare {lp,ep},8,sp
|
||||
sst.w r1,4[ep]
|
||||
sst.w r5,0[ep]
|
||||
jarl vTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl xTaskIncrementTick,lp ; Call the timer tick function.
|
||||
sld.w 0[ep],r5
|
||||
sld.w 4[ep],r1
|
||||
dispose 8,{lp,ep}
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
; Functions used by scheduler
|
||||
;------------------------------------------------------------------------------
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN xTaskIncrementTick
|
||||
|
||||
; Variables used by scheduler
|
||||
;------------------------------------------------------------------------------
|
||||
|
@ -287,7 +287,7 @@ MD_INTTM0EQ0:
|
|||
stsr 1,lp
|
||||
st.w lp,0[sp] ; store EIPSW to stack
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
jarl vTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl xTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl vTaskSwitchContext,lp ; Call the scheduler.
|
||||
portRESTORE_CONTEXT ; Restore the context of whichever task the ...
|
||||
; ... scheduler decided should run.
|
||||
|
@ -306,7 +306,7 @@ MD_INTTM0EQ0:
|
|||
prepare {lp,ep},8,sp
|
||||
sst.w r1,4[ep]
|
||||
sst.w r5,0[ep]
|
||||
jarl vTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl xTaskIncrementTick,lp ; Call the timer tick function.
|
||||
sld.w 0[ep],r5
|
||||
sld.w 4[ep],r1
|
||||
dispose 8,{lp,ep}
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
; Functions used by scheduler
|
||||
;------------------------------------------------------------------------------
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN xTaskIncrementTick
|
||||
|
||||
; Variables used by scheduler
|
||||
;------------------------------------------------------------------------------
|
||||
|
@ -278,7 +278,7 @@ MD_INTTM0EQ0:
|
|||
stsr 1,lp
|
||||
st.w lp,0[sp] ; store EIPSW to stack
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
jarl vTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl xTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl vTaskSwitchContext,lp ; Call the scheduler.
|
||||
portRESTORE_CONTEXT ; Restore the context of whichever task the ...
|
||||
; ... scheduler decided should run.
|
||||
|
@ -297,7 +297,7 @@ MD_INTTM0EQ0:
|
|||
prepare {lp,ep},8,sp
|
||||
sst.w r1,4[ep]
|
||||
sst.w r5,0[ep]
|
||||
jarl vTaskIncrementTick,lp ; Call the timer tick function.
|
||||
jarl xTaskIncrementTick,lp ; Call the timer tick function.
|
||||
sld.w 0[ep],r5
|
||||
sld.w 4[ep],r1
|
||||
dispose 8,{lp,ep}
|
||||
|
|
Loading…
Reference in a new issue