mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-01 08:54:14 -04:00
Convert mpre ports to use xTaskIncrementTick() in place of vTaskIncrementTick().
This commit is contained in:
parent
686d190798
commit
15ec6c87f7
11 changed files with 44 additions and 49 deletions
|
@ -68,7 +68,7 @@
|
|||
; Functions used by scheduler
|
||||
;------------------------------------------------------------------------------
|
||||
EXTERN vTaskSwitchContext
|
||||
EXTERN vTaskIncrementTick
|
||||
EXTERN xTaskIncrementTick
|
||||
|
||||
; Tick ISR Prototype
|
||||
;------------------------------------------------------------------------------
|
||||
|
@ -133,7 +133,7 @@ vPortStart:
|
|||
MD_INTTM05:
|
||||
|
||||
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
|
||||
|
|
|
@ -210,14 +210,14 @@ void xPortSysTickHandler( void )
|
|||
{
|
||||
unsigned long ulDummy;
|
||||
|
||||
/* If using preemption, also force a context switch. */
|
||||
#if configUSE_PREEMPTION == 1
|
||||
*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
|
||||
#endif
|
||||
|
||||
ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
{
|
||||
vTaskIncrementTick();
|
||||
/* Increment the RTOS tick. */
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* Pend a context switch. */
|
||||
*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
|
||||
}
|
||||
}
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );
|
||||
}
|
||||
|
|
|
@ -275,11 +275,6 @@ void vPortExitCritical( void )
|
|||
|
||||
void xPortSysTickHandler( void )
|
||||
{
|
||||
/* If using preemption, also force a context switch. */
|
||||
#if configUSE_PREEMPTION == 1
|
||||
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
|
||||
#endif
|
||||
|
||||
/* Only reset the systick load register if configUSE_TICKLESS_IDLE is set to
|
||||
1. If it is set to 0 tickless idle is not being used. If it is set to a
|
||||
value other than 0 or 1 then a timer other than the SysTick is being used
|
||||
|
@ -290,7 +285,12 @@ void xPortSysTickHandler( void )
|
|||
|
||||
( void ) portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
{
|
||||
vTaskIncrementTick();
|
||||
/* Increment the RTOS tick. */
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* Pend a context switch. */
|
||||
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
|
||||
}
|
||||
}
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue