summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FreeRTOS/Source/portable/IAR/ATMega323/port.c22
-rw-r--r--FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s904
-rw-r--r--FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c2
-rw-r--r--FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c2
-rw-r--r--FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s794
-rw-r--r--FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c7
-rw-r--r--FreeRTOS/Source/portable/IAR/LPC2000/port.c15
-rw-r--r--FreeRTOS/Source/portable/IAR/LPC2000/portasm.s791
-rw-r--r--FreeRTOS/Source/portable/IAR/MSP430/portext.s434
-rw-r--r--FreeRTOS/Source/portable/IAR/MSP430X/portext.s434
-rw-r--r--FreeRTOS/Source/portable/IAR/RL78/portasm.s874
-rw-r--r--FreeRTOS/Source/portable/IAR/RX100/port.c12
-rw-r--r--FreeRTOS/Source/portable/IAR/STR71x/port.c13
-rw-r--r--FreeRTOS/Source/portable/IAR/STR75x/port.c13
-rw-r--r--FreeRTOS/Source/portable/IAR/STR91x/port.c11
-rw-r--r--FreeRTOS/Source/portable/IAR/V850ES/portasm.s856
-rw-r--r--FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s856
-rw-r--r--FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s856
18 files changed, 61 insertions, 75 deletions
diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/port.c b/FreeRTOS/Source/portable/IAR/ATMega323/port.c
index 376316647..e8015c1a7 100644
--- a/FreeRTOS/Source/portable/IAR/ATMega323/port.c
+++ b/FreeRTOS/Source/portable/IAR/ATMega323/port.c
@@ -56,19 +56,19 @@
***************************************************************************
- http://www.FreeRTOS.org - Documentation, books, training, latest versions,
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, and our new
fully thread aware and reentrant UDP/IP stack.
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
- Integrity Systems, who sell the code with commercial support,
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
+ Integrity Systems, who sell the code with commercial support,
indemnification and middleware, under the OpenRTOS brand.
-
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety
- engineered and independently SIL3 certified version for use in safety and
+
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
*/
@@ -147,7 +147,7 @@ portSTACK_TYPE *pxTopOfHardwareStack;
hardware call stack which uses the AVR stack pointer. Second there is the
software stack (local variables, parameter passing, etc.) which uses the
AVR Y register.
-
+
This function places both stacks within the memory block passed in as the
first parameter. The hardware stack is placed at the bottom of the memory
block. A gap is then left for the hardware stack to grow. Next the software
@@ -349,7 +349,7 @@ unsigned char ucHighByte, ucLowByte;
vPortYieldFromTick();
asm( "reti" );
}
-
+
#else
/*
@@ -359,10 +359,10 @@ unsigned char ucHighByte, ucLowByte;
*
* THE INTERRUPT VECTOR IS POPULATED IN portmacro.s90. DO NOT INSTALL
* IT HERE USING THE USUAL PRAGMA.
- */
+ */
__interrupt void SIG_OUTPUT_COMPARE1A( void )
{
- vTaskIncrementTick();
+ xTaskIncrementTick();
}
#endif
/*-----------------------------------------------------------*/
@@ -383,4 +383,4 @@ void vPortExitCritical( void )
}
}
-
+
diff --git a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90 b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90
index 25e6df9d4..7e892caf7 100644
--- a/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90
+++ b/FreeRTOS/Source/portable/IAR/ATMega323/portmacro.s90
@@ -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.
diff --git a/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c b/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c
index e5b684697..c83d63898 100644
--- a/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c
+++ b/FreeRTOS/Source/portable/IAR/AVR32_UC3/port.c
@@ -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". */
diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c
index 6196c0306..90742975f 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/port.c
@@ -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;
diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79 b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
index 7bfca8142..8752bec8a 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
@@ -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.
diff --git a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c
index c04faa684..f87e45162 100644
--- a/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c
+++ b/FreeRTOS/Source/portable/IAR/AtmelSAM9XE/port.c
@@ -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;
diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/port.c b/FreeRTOS/Source/portable/IAR/LPC2000/port.c
index e41de310b..97259e4eb 100644
--- a/FreeRTOS/Source/portable/IAR/LPC2000/port.c
+++ b/FreeRTOS/Source/portable/IAR/LPC2000/port.c
@@ -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;
diff --git a/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79 b/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79
index 0a2086274..6277291a7 100644
--- a/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79
+++ b/FreeRTOS/Source/portable/IAR/LPC2000/portasm.s79
@@ -54,7 +54,6 @@
CODE32
EXTERN vTaskSwitchContext
- EXTERN vTaskIncrementTick
EXTERN vPortPreemptiveTick
PUBLIC vPortPreemptiveTickEntry
diff --git a/FreeRTOS/Source/portable/IAR/MSP430/portext.s43 b/FreeRTOS/Source/portable/IAR/MSP430/portext.s43
index d759c8613..5ed4f1723 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430/portext.s43
+++ b/FreeRTOS/Source/portable/IAR/MSP430/portext.s43
@@ -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
diff --git a/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43 b/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43
index 04113ca14..fdd710498 100644
--- a/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43
+++ b/FreeRTOS/Source/portable/IAR/MSP430X/portext.s43
@@ -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
diff --git a/FreeRTOS/Source/portable/IAR/RL78/portasm.s87 b/FreeRTOS/Source/portable/IAR/RL78/portasm.s87
index d789787e7..6da1fb179 100644
--- a/FreeRTOS/Source/portable/IAR/RL78/portasm.s87
+++ b/FreeRTOS/Source/portable/IAR/RL78/portasm.s87
@@ -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
diff --git a/FreeRTOS/Source/portable/IAR/RX100/port.c b/FreeRTOS/Source/portable/IAR/RX100/port.c
index 23b04391e..21fb160db 100644
--- a/FreeRTOS/Source/portable/IAR/RX100/port.c
+++ b/FreeRTOS/Source/portable/IAR/RX100/port.c
@@ -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. */
diff --git a/FreeRTOS/Source/portable/IAR/STR71x/port.c b/FreeRTOS/Source/portable/IAR/STR71x/port.c
index 7d0a14588..2218b56ea 100644
--- a/FreeRTOS/Source/portable/IAR/STR71x/port.c
+++ b/FreeRTOS/Source/portable/IAR/STR71x/port.c
@@ -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;
diff --git a/FreeRTOS/Source/portable/IAR/STR75x/port.c b/FreeRTOS/Source/portable/IAR/STR75x/port.c
index 26e656887..7f2f49f2c 100644
--- a/FreeRTOS/Source/portable/IAR/STR75x/port.c
+++ b/FreeRTOS/Source/portable/IAR/STR75x/port.c
@@ -209,15 +209,12 @@ 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 );
}
/*-----------------------------------------------------------*/
diff --git a/FreeRTOS/Source/portable/IAR/STR91x/port.c b/FreeRTOS/Source/portable/IAR/STR91x/port.c
index 589bcfc48..24f3f4ef4 100644
--- a/FreeRTOS/Source/portable/IAR/STR91x/port.c
+++ b/FreeRTOS/Source/portable/IAR/STR91x/port.c
@@ -324,16 +324,11 @@ keyword. */
{
{
/* Increment the tick counter. */
- vTaskIncrementTick();
-
- #if configUSE_PREEMPTION == 1
- {
- /* 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( xTaskIncrementTick() != pdFALSE )
+ {
+ /* Select a new task to execute. */
vTaskSwitchContext();
}
- #endif /* configUSE_PREEMPTION. */
/* Clear the interrupt in the watchdog. */
WDG->SR &= ~0x0001;
diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85
index 789403801..5d1573842 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85
+++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm.s85
@@ -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}
diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85
index 7776144b4..bd2453fb3 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85
+++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Fx3.s85
@@ -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}
diff --git a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85 b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85
index 05b85fca9..985bc9deb 100644
--- a/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85
+++ b/FreeRTOS/Source/portable/IAR/V850ES/portasm_Hx2.s85
@@ -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}