From: richardbarry Date: Fri, 30 May 2008 15:44:17 +0000 (+0000) Subject: Update to V5.0.2 X-Git-Tag: V5.0.2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e085f567e580231a3c36eca93deb00e572e1a61b;p=freertos Update to V5.0.2 git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@394 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h b/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h index 2b4289daa..bbd9e2df1 100644 --- a/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h +++ b/Demo/ARM7_STR75x_GCC/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c b/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c index 98889734a..b10a3d4ae 100644 --- a/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c +++ b/Demo/ARM7_STR75x_GCC/ParTest/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_GCC/main.c b/Demo/ARM7_STR75x_GCC/main.c index 5c344e858..a969175d5 100644 --- a/Demo/ARM7_STR75x_GCC/main.c +++ b/Demo/ARM7_STR75x_GCC/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_GCC/serial/serial.c b/Demo/ARM7_STR75x_GCC/serial/serial.c index 33e1e8157..33759da67 100644 --- a/Demo/ARM7_STR75x_GCC/serial/serial.c +++ b/Demo/ARM7_STR75x_GCC/serial/serial.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_GCC/serial/serialISR.c b/Demo/ARM7_STR75x_GCC/serial/serialISR.c index b1618cc57..e78056330 100644 --- a/Demo/ARM7_STR75x_GCC/serial/serialISR.c +++ b/Demo/ARM7_STR75x_GCC/serial/serialISR.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h b/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h index 214cb8568..78d1be0d9 100644 --- a/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h +++ b/Demo/ARM7_STR75x_IAR/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c b/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c index 98889734a..b10a3d4ae 100644 --- a/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c +++ b/Demo/ARM7_STR75x_IAR/ParTest/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_IAR/main.c b/Demo/ARM7_STR75x_IAR/main.c index ac63dd9a0..e253e5234 100644 --- a/Demo/ARM7_STR75x_IAR/main.c +++ b/Demo/ARM7_STR75x_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM7_STR75x_IAR/serial/serial.c b/Demo/ARM7_STR75x_IAR/serial/serial.c index a7b576da9..22fec7a91 100644 --- a/Demo/ARM7_STR75x_IAR/serial/serial.c +++ b/Demo/ARM7_STR75x_IAR/serial/serial.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h b/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h index 77e984a7c..d1e604db8 100644 --- a/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h +++ b/Demo/ARM9_STR91X_IAR/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS distribution. diff --git a/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c b/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c index 246295423..e3eb21ea3 100644 --- a/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c +++ b/Demo/ARM9_STR91X_IAR/ParTest/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS distribution. diff --git a/Demo/ARM9_STR91X_IAR/main.c b/Demo/ARM9_STR91X_IAR/main.c index b116a7421..896a6790a 100644 --- a/Demo/ARM9_STR91X_IAR/main.c +++ b/Demo/ARM9_STR91X_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS distribution. diff --git a/Demo/ARM9_STR91X_IAR/serial/serial.c b/Demo/ARM9_STR91X_IAR/serial/serial.c index db4099e3d..31f43b508 100644 --- a/Demo/ARM9_STR91X_IAR/serial/serial.c +++ b/Demo/ARM9_STR91X_IAR/serial/serial.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS distribution. diff --git a/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c b/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c index 2a6299e68..8057f3546 100644 --- a/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c +++ b/Demo/ARM9_STR91X_IAR/webserver/uIP_Task.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR32_UC3/main.c b/Demo/AVR32_UC3/main.c index cfe21ded9..26c85be41 100644 --- a/Demo/AVR32_UC3/main.c +++ b/Demo/AVR32_UC3/main.c @@ -30,7 +30,7 @@ *****************************************************************************/ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h b/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h index aea72abf1..c9e242a3b 100644 --- a/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h +++ b/Demo/AVR_ATMega323_IAR/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c b/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c index 539084ad7..6664020c9 100644 --- a/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c +++ b/Demo/AVR_ATMega323_IAR/ParTest/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_IAR/main.c b/Demo/AVR_ATMega323_IAR/main.c index 02df2a142..297802b99 100644 --- a/Demo/AVR_ATMega323_IAR/main.c +++ b/Demo/AVR_ATMega323_IAR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_IAR/regtest.c b/Demo/AVR_ATMega323_IAR/regtest.c index ce93a155b..999ed5cc4 100644 --- a/Demo/AVR_ATMega323_IAR/regtest.c +++ b/Demo/AVR_ATMega323_IAR/regtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_IAR/regtest.h b/Demo/AVR_ATMega323_IAR/regtest.h index c1f5a2f08..163522e4e 100644 --- a/Demo/AVR_ATMega323_IAR/regtest.h +++ b/Demo/AVR_ATMega323_IAR/regtest.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_IAR/serial/serial.c b/Demo/AVR_ATMega323_IAR/serial/serial.c index dd3e7ca78..258964905 100644 --- a/Demo/AVR_ATMega323_IAR/serial/serial.c +++ b/Demo/AVR_ATMega323_IAR/serial/serial.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h b/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h index 62e863300..f948ab9f1 100644 --- a/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h +++ b/Demo/AVR_ATMega323_WinAVR/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c b/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c index 539084ad7..6664020c9 100644 --- a/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c +++ b/Demo/AVR_ATMega323_WinAVR/ParTest/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_WinAVR/main.c b/Demo/AVR_ATMega323_WinAVR/main.c index b3a5cf1a8..dace5ee81 100644 --- a/Demo/AVR_ATMega323_WinAVR/main.c +++ b/Demo/AVR_ATMega323_WinAVR/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_WinAVR/regtest.c b/Demo/AVR_ATMega323_WinAVR/regtest.c index d965e062c..c7133e5e6 100644 --- a/Demo/AVR_ATMega323_WinAVR/regtest.c +++ b/Demo/AVR_ATMega323_WinAVR/regtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_WinAVR/regtest.h b/Demo/AVR_ATMega323_WinAVR/regtest.h index c1f5a2f08..163522e4e 100644 --- a/Demo/AVR_ATMega323_WinAVR/regtest.h +++ b/Demo/AVR_ATMega323_WinAVR/regtest.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/AVR_ATMega323_WinAVR/serial/serial.c b/Demo/AVR_ATMega323_WinAVR/serial/serial.c index 8c04cd042..f62411e1d 100644 --- a/Demo/AVR_ATMega323_WinAVR/serial/serial.c +++ b/Demo/AVR_ATMega323_WinAVR/serial/serial.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h index 589c390e5..6d31e8af3 100644 --- a/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_GCC/Demo1/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_GCC/Demo1/main.c b/Demo/CORTEX_LM3S102_GCC/Demo1/main.c index 868d05c24..1dd9cf3df 100644 --- a/Demo/CORTEX_LM3S102_GCC/Demo1/main.c +++ b/Demo/CORTEX_LM3S102_GCC/Demo1/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h index 9a86d9933..0e36a8755 100644 --- a/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_GCC/Demo2/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_GCC/Demo2/main.c b/Demo/CORTEX_LM3S102_GCC/Demo2/main.c index b520655a4..2394524e8 100644 --- a/Demo/CORTEX_LM3S102_GCC/Demo2/main.c +++ b/Demo/CORTEX_LM3S102_GCC/Demo2/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h index 589c390e5..6d31e8af3 100644 --- a/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_GCC/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c b/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c index 684a2e02e..46db7e0a5 100644 --- a/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c +++ b/Demo/CORTEX_LM3S102_GCC/ParTest/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_GCC/main.c b/Demo/CORTEX_LM3S102_GCC/main.c index 868d05c24..1dd9cf3df 100644 --- a/Demo/CORTEX_LM3S102_GCC/main.c +++ b/Demo/CORTEX_LM3S102_GCC/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_KEIL/Demo1/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_KEIL/Demo1/FreeRTOSConfig.h index 589c390e5..6d31e8af3 100644 --- a/Demo/CORTEX_LM3S102_KEIL/Demo1/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_KEIL/Demo1/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_KEIL/Demo1/main.c b/Demo/CORTEX_LM3S102_KEIL/Demo1/main.c index 8d4a7680a..a5f5d6eb4 100644 --- a/Demo/CORTEX_LM3S102_KEIL/Demo1/main.c +++ b/Demo/CORTEX_LM3S102_KEIL/Demo1/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_KEIL/Demo2/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_KEIL/Demo2/FreeRTOSConfig.h index 9a86d9933..0e36a8755 100644 --- a/Demo/CORTEX_LM3S102_KEIL/Demo2/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_KEIL/Demo2/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_KEIL/Demo2/main.c b/Demo/CORTEX_LM3S102_KEIL/Demo2/main.c index e9107c9ea..be090ddd5 100644 --- a/Demo/CORTEX_LM3S102_KEIL/Demo2/main.c +++ b/Demo/CORTEX_LM3S102_KEIL/Demo2/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_KEIL/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_KEIL/FreeRTOSConfig.h index 5faf5cc36..d4879a359 100644 --- a/Demo/CORTEX_LM3S102_KEIL/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_KEIL/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_KEIL/ParTest/ParTest.c b/Demo/CORTEX_LM3S102_KEIL/ParTest/ParTest.c index 684a2e02e..46db7e0a5 100644 --- a/Demo/CORTEX_LM3S102_KEIL/ParTest/ParTest.c +++ b/Demo/CORTEX_LM3S102_KEIL/ParTest/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_KEIL/main.c b/Demo/CORTEX_LM3S102_KEIL/main.c index 8d4a7680a..a5f5d6eb4 100644 --- a/Demo/CORTEX_LM3S102_KEIL/main.c +++ b/Demo/CORTEX_LM3S102_KEIL/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h index 589c390e5..6d31e8af3 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_Rowley/Demo1/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c b/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c index 684a2e02e..46db7e0a5 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c +++ b/Demo/CORTEX_LM3S102_Rowley/Demo1/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c b/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c index 9ba107705..df65a5590 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c +++ b/Demo/CORTEX_LM3S102_Rowley/Demo1/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h index 9a86d9933..0e36a8755 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_Rowley/Demo2/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c b/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c index 684a2e02e..46db7e0a5 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c +++ b/Demo/CORTEX_LM3S102_Rowley/Demo2/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c b/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c index 4039e249e..49d6612c0 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c +++ b/Demo/CORTEX_LM3S102_Rowley/Demo2/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h b/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h index 837b9e8dd..b95e2ab09 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h +++ b/Demo/CORTEX_LM3S102_Rowley/Demo3/FreeRTOSConfig.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c b/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c index a6716bbec..9868e83f6 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c +++ b/Demo/CORTEX_LM3S102_Rowley/Demo3/ParTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c b/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c index 9658cfde1..ff75a4c62 100644 --- a/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c +++ b/Demo/CORTEX_LM3S102_Rowley/Demo3/main.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/BlockQ.c b/Demo/Common/Full/BlockQ.c index 7ac251dab..6b641c278 100644 --- a/Demo/Common/Full/BlockQ.c +++ b/Demo/Common/Full/BlockQ.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/PollQ.c b/Demo/Common/Full/PollQ.c index 8e6a935a0..be0f1764e 100644 --- a/Demo/Common/Full/PollQ.c +++ b/Demo/Common/Full/PollQ.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/comtest.c b/Demo/Common/Full/comtest.c index da1a1b645..67eb5e407 100644 --- a/Demo/Common/Full/comtest.c +++ b/Demo/Common/Full/comtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/death.c b/Demo/Common/Full/death.c index c3c4ba04a..33cd6a290 100644 --- a/Demo/Common/Full/death.c +++ b/Demo/Common/Full/death.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/dynamic.c b/Demo/Common/Full/dynamic.c index 257fe652b..9e370caff 100644 --- a/Demo/Common/Full/dynamic.c +++ b/Demo/Common/Full/dynamic.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/events.c b/Demo/Common/Full/events.c index b22b61857..8c67e1bbc 100644 --- a/Demo/Common/Full/events.c +++ b/Demo/Common/Full/events.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/flash.c b/Demo/Common/Full/flash.c index e333608a1..2d03d7a58 100644 --- a/Demo/Common/Full/flash.c +++ b/Demo/Common/Full/flash.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/flop.c b/Demo/Common/Full/flop.c index ec012a0fa..9aae6a483 100644 --- a/Demo/Common/Full/flop.c +++ b/Demo/Common/Full/flop.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/integer.c b/Demo/Common/Full/integer.c index 3dd6212fb..e621c4aae 100644 --- a/Demo/Common/Full/integer.c +++ b/Demo/Common/Full/integer.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/print.c b/Demo/Common/Full/print.c index f973e02b8..a9c36752b 100644 --- a/Demo/Common/Full/print.c +++ b/Demo/Common/Full/print.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Full/semtest.c b/Demo/Common/Full/semtest.c index d7a169dc6..77fed3ce5 100644 --- a/Demo/Common/Full/semtest.c +++ b/Demo/Common/Full/semtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/AltBlckQ.c b/Demo/Common/Minimal/AltBlckQ.c index 7c7753a4e..e8a17cb6f 100644 --- a/Demo/Common/Minimal/AltBlckQ.c +++ b/Demo/Common/Minimal/AltBlckQ.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/AltBlock.c b/Demo/Common/Minimal/AltBlock.c index 580700ec8..14a517f03 100644 --- a/Demo/Common/Minimal/AltBlock.c +++ b/Demo/Common/Minimal/AltBlock.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/AltPollQ.c b/Demo/Common/Minimal/AltPollQ.c index 005393dee..18589b7b7 100644 --- a/Demo/Common/Minimal/AltPollQ.c +++ b/Demo/Common/Minimal/AltPollQ.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/AltQTest.c b/Demo/Common/Minimal/AltQTest.c index 2ed5002a1..b5de90b36 100644 --- a/Demo/Common/Minimal/AltQTest.c +++ b/Demo/Common/Minimal/AltQTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/BlockQ.c b/Demo/Common/Minimal/BlockQ.c index 99f27dfbf..6a3d0c35a 100644 --- a/Demo/Common/Minimal/BlockQ.c +++ b/Demo/Common/Minimal/BlockQ.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/GenQTest.c b/Demo/Common/Minimal/GenQTest.c index dad8bcfc9..f7599dcbb 100644 --- a/Demo/Common/Minimal/GenQTest.c +++ b/Demo/Common/Minimal/GenQTest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/IntQueue.c b/Demo/Common/Minimal/IntQueue.c index 7647ec0f4..fc6925d84 100644 --- a/Demo/Common/Minimal/IntQueue.c +++ b/Demo/Common/Minimal/IntQueue.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. @@ -97,9 +97,9 @@ coverage. */ /* Each task and interrupt is given a unique identifier. This value is used to identify which task sent or received each value. The identifier is also used to distinguish between two tasks that are running the same task function. */ -#define intqHIGH_PRIROITY_TASK1 ( ( unsigned portBASE_TYPE ) 1 ) -#define intqHIGH_PRIROITY_TASK2 ( ( unsigned portBASE_TYPE ) 2 ) -#define intqLOW_PRIROITY_TASK ( ( unsigned portBASE_TYPE ) 3 ) +#define intqHIGH_PRIORITY_TASK1 ( ( unsigned portBASE_TYPE ) 1 ) +#define intqHIGH_PRIORITY_TASK2 ( ( unsigned portBASE_TYPE ) 2 ) +#define intqLOW_PRIORITY_TASK ( ( unsigned portBASE_TYPE ) 3 ) #define intqFIRST_INTERRUPT ( ( unsigned portBASE_TYPE ) 4 ) #define intqSECOND_INTERRUPT ( ( unsigned portBASE_TYPE ) 5 ) #define intqQUEUE_LENGTH ( ( unsigned portBASE_TYPE ) 10 ) @@ -207,11 +207,11 @@ static void prvQueueAccessLogError( unsigned portBASE_TYPE uxLine ); void vStartInterruptQueueTasks( void ) { /* Start the test tasks. */ - xTaskCreate( prvHigherPriorityNormallyEmptyTask, ( signed portCHAR * ) "H1QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIROITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask1 ); - xTaskCreate( prvHigherPriorityNormallyEmptyTask, ( signed portCHAR * ) "H2QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIROITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask2 ); + xTaskCreate( prvHigherPriorityNormallyEmptyTask, ( signed portCHAR * ) "H1QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask1 ); + xTaskCreate( prvHigherPriorityNormallyEmptyTask, ( signed portCHAR * ) "H2QRx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyEmptyTask2 ); xTaskCreate( prvLowerPriorityNormallyEmptyTask, ( signed portCHAR * ) "LQRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL ); - xTaskCreate( prv1stHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIROITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask1 ); - xTaskCreate( prv2ndHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIROITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask2 ); + xTaskCreate( prv1stHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK1, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask1 ); + xTaskCreate( prv2ndHigherPriorityNormallyFullTask, ( signed portCHAR * ) "H1QTx", configMINIMAL_STACK_SIZE, ( void * ) intqHIGH_PRIORITY_TASK2, intqHIGHER_PRIORITY, &xHighPriorityNormallyFullTask2 ); xTaskCreate( prvLowerPriorityNormallyFullTask, ( signed portCHAR * ) "LQRx", configMINIMAL_STACK_SIZE, NULL, intqLOWER_PRIORITY, NULL ); /* Create the queues that are accessed by multiple tasks and multiple @@ -280,7 +280,7 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2; /* The timer should not be started until after the scheduler has started. More than one task is running this code so we check the parameter value to determine which task should start the timer. */ - if( ( unsigned portBASE_TYPE ) pvParameters == intqHIGH_PRIROITY_TASK1 ) + if( ( unsigned portBASE_TYPE ) pvParameters == intqHIGH_PRIORITY_TASK1 ) { vInitialiseTimerForIntQueueTest(); } @@ -303,7 +303,7 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2; /* Ensure the other task running this code gets a chance to execute. */ taskYIELD(); - if( ( unsigned portBASE_TYPE ) pvParameters == intqHIGH_PRIROITY_TASK1 ) + if( ( unsigned portBASE_TYPE ) pvParameters == intqHIGH_PRIORITY_TASK1 ) { /* Have we received all the expected values? */ if( uxValueForNormallyEmptyQueue > ( intqNUM_VALUES_TO_LOG + intqVALUE_OVERRUN ) ) @@ -324,12 +324,12 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2; } else { - if( ucNormallyEmptyReceivedValues[ ux ] == intqHIGH_PRIROITY_TASK1 ) + if( ucNormallyEmptyReceivedValues[ ux ] == intqHIGH_PRIORITY_TASK1 ) { /* Value was placed into the array by task 1. */ uxTask1++; } - else if( ucNormallyEmptyReceivedValues[ ux ] == intqHIGH_PRIROITY_TASK2 ) + else if( ucNormallyEmptyReceivedValues[ ux ] == intqHIGH_PRIORITY_TASK2 ) { /* Value was placed into the array by task 2. */ uxTask2++; @@ -388,7 +388,7 @@ portBASE_TYPE xQueueStatus; prvQueueAccessLogError( __LINE__ ); } - prvRecordValue_NormallyEmpty( uxRxed, intqLOW_PRIROITY_TASK ); + prvRecordValue_NormallyEmpty( uxRxed, intqLOW_PRIORITY_TASK ); /* Wake the higher priority task again. */ vTaskResume( xHighPriorityNormallyEmptyTask1 ); @@ -451,7 +451,7 @@ portBASE_TYPE xQueueStatus; if( ( xQueueStatus = xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) ) != pdPASS ) { - /* intqHIGH_PRIROITY_TASK2 is never suspended so we would not + /* intqHIGH_PRIORITY_TASK2 is never suspended so we would not expect it to ever time out. */ prvQueueAccessLogError( __LINE__ ); } @@ -588,7 +588,7 @@ portBASE_TYPE xQueueStatus; } else { - prvRecordValue_NormallyFull( uxValue, intqLOW_PRIROITY_TASK ); + prvRecordValue_NormallyFull( uxValue, intqLOW_PRIORITY_TASK ); } vTaskPrioritySet( NULL, intqLOWER_PRIORITY ); diff --git a/Demo/Common/Minimal/PollQ.c b/Demo/Common/Minimal/PollQ.c index a47c45f13..24487e316 100644 --- a/Demo/Common/Minimal/PollQ.c +++ b/Demo/Common/Minimal/PollQ.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/QPeek.c b/Demo/Common/Minimal/QPeek.c index b89a1185b..a9ead1325 100644 --- a/Demo/Common/Minimal/QPeek.c +++ b/Demo/Common/Minimal/QPeek.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/blocktim.c b/Demo/Common/Minimal/blocktim.c index 92f7fb0fd..861837661 100644 --- a/Demo/Common/Minimal/blocktim.c +++ b/Demo/Common/Minimal/blocktim.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/comtest.c b/Demo/Common/Minimal/comtest.c index 0bb96ec26..6d6e3caa6 100644 --- a/Demo/Common/Minimal/comtest.c +++ b/Demo/Common/Minimal/comtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/countsem.c b/Demo/Common/Minimal/countsem.c index bf0c89632..bf2fbb89b 100644 --- a/Demo/Common/Minimal/countsem.c +++ b/Demo/Common/Minimal/countsem.c @@ -1,143 +1,143 @@ -/* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. - - This file is part of the FreeRTOS.org distribution. - - FreeRTOS.org is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - FreeRTOS.org is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with FreeRTOS.org; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - A special exception to the GPL can be applied should you wish to distribute - a combined work that includes FreeRTOS.org, without being obliged to provide - the source code for any proprietary components. See the licensing section - of http://www.FreeRTOS.org for full details of how and when the exception - can be applied. - - *************************************************************************** - *************************************************************************** - * * - * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, * - * and even write all or part of your application on your behalf. * - * See http://www.OpenRTOS.com for details of the services we provide to * - * expedite your project. * - * * - *************************************************************************** - *************************************************************************** - - Please ensure to read the configuration and relevant port sections of the - online documentation. - - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. - - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. - - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. -*/ - - -/* - * Simple demonstration of the usage of counting semaphore. - */ - -/* Scheduler include files. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* Demo program include files. */ -#include "countsem.h" - -/* The maximum count value that the semaphore used for the demo can hold. */ -#define countMAX_COUNT_VALUE ( 200 ) - -/* Constants used to indicate whether or not the semaphore should have been -created with its maximum count value, or its minimum count value. These -numbers are used to ensure that the pointers passed in as the task parameters -are valid. */ -#define countSTART_AT_MAX_COUNT ( 0xaa ) -#define countSTART_AT_ZERO ( 0x55 ) - -/* Two tasks are created for the test. One uses a semaphore created with its -count value set to the maximum, and one with the count value set to zero. */ -#define countNUM_TEST_TASKS ( 2 ) -#define countDONT_BLOCK ( 0 ) - -/*-----------------------------------------------------------*/ - -/* Flag that will be latched to pdTRUE should any unexpected behaviour be -detected in any of the tasks. */ -static volatile portBASE_TYPE xErrorDetected = pdFALSE; - -/*-----------------------------------------------------------*/ - -/* - * The demo task. This simply counts the semaphore up to its maximum value, - * the counts it back down again. The result of each semaphore 'give' and - * 'take' is inspected, with an error being flagged if it is found not to be - * the expected result. - */ -static void prvCountingSemaphoreTask( void *pvParameters ); - -/* - * Utility function to increment the semaphore count value up from zero to - * countMAX_COUNT_VALUE. - */ -static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); - -/* - * Utility function to decrement the semaphore count value up from - * countMAX_COUNT_VALUE to zero. - */ -static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); - -/*-----------------------------------------------------------*/ - -/* The structure that is passed into the task as the task parameter. */ -typedef struct COUNT_SEM_STRUCT -{ - /* The semaphore to be used for the demo. */ - xSemaphoreHandle xSemaphore; - - /* Set to countSTART_AT_MAX_COUNT if the semaphore should be created with - its count value set to its max count value, or countSTART_AT_ZERO if it - should have been created with its count value set to 0. */ - unsigned portBASE_TYPE uxExpectedStartCount; - - /* Incremented on each cycle of the demo task. Used to detect a stalled - task. */ - unsigned portBASE_TYPE uxLoopCounter; -} xCountSemStruct; - -/* Two structures are defined, one is passed to each test task. */ -static volatile xCountSemStruct xParameters[ countNUM_TEST_TASKS ]; - -/*-----------------------------------------------------------*/ - -void vStartCountingSemaphoreTasks( void ) -{ - /* Create the semaphores that we are going to use for the test/demo. The - first should be created such that it starts at its maximum count value, - the second should be created such that it starts with a count value of zero. */ - xParameters[ 0 ].xSemaphore = xSemaphoreCreateCounting( countMAX_COUNT_VALUE, countMAX_COUNT_VALUE ); - xParameters[ 0 ].uxExpectedStartCount = countSTART_AT_MAX_COUNT; - xParameters[ 0 ].uxLoopCounter = 0; - - xParameters[ 1 ].xSemaphore = xSemaphoreCreateCounting( countMAX_COUNT_VALUE, 0 ); - xParameters[ 1 ].uxExpectedStartCount = 0; - xParameters[ 1 ].uxLoopCounter = 0; +/* + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. + + This file is part of the FreeRTOS.org distribution. + + FreeRTOS.org is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + FreeRTOS.org is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with FreeRTOS.org; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A special exception to the GPL can be applied should you wish to distribute + a combined work that includes FreeRTOS.org, without being obliged to provide + the source code for any proprietary components. See the licensing section + of http://www.FreeRTOS.org for full details of how and when the exception + can be applied. + + *************************************************************************** + *************************************************************************** + * * + * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, * + * and even write all or part of your application on your behalf. * + * See http://www.OpenRTOS.com for details of the services we provide to * + * expedite your project. * + * * + *************************************************************************** + *************************************************************************** + + Please ensure to read the configuration and relevant port sections of the + online documentation. + + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. + + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. + + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. +*/ + + +/* + * Simple demonstration of the usage of counting semaphore. + */ + +/* Scheduler include files. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" + +/* Demo program include files. */ +#include "countsem.h" + +/* The maximum count value that the semaphore used for the demo can hold. */ +#define countMAX_COUNT_VALUE ( 200 ) + +/* Constants used to indicate whether or not the semaphore should have been +created with its maximum count value, or its minimum count value. These +numbers are used to ensure that the pointers passed in as the task parameters +are valid. */ +#define countSTART_AT_MAX_COUNT ( 0xaa ) +#define countSTART_AT_ZERO ( 0x55 ) + +/* Two tasks are created for the test. One uses a semaphore created with its +count value set to the maximum, and one with the count value set to zero. */ +#define countNUM_TEST_TASKS ( 2 ) +#define countDONT_BLOCK ( 0 ) + +/*-----------------------------------------------------------*/ + +/* Flag that will be latched to pdTRUE should any unexpected behaviour be +detected in any of the tasks. */ +static volatile portBASE_TYPE xErrorDetected = pdFALSE; + +/*-----------------------------------------------------------*/ + +/* + * The demo task. This simply counts the semaphore up to its maximum value, + * the counts it back down again. The result of each semaphore 'give' and + * 'take' is inspected, with an error being flagged if it is found not to be + * the expected result. + */ +static void prvCountingSemaphoreTask( void *pvParameters ); + +/* + * Utility function to increment the semaphore count value up from zero to + * countMAX_COUNT_VALUE. + */ +static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); + +/* + * Utility function to decrement the semaphore count value up from + * countMAX_COUNT_VALUE to zero. + */ +static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ); + +/*-----------------------------------------------------------*/ + +/* The structure that is passed into the task as the task parameter. */ +typedef struct COUNT_SEM_STRUCT +{ + /* The semaphore to be used for the demo. */ + xSemaphoreHandle xSemaphore; + + /* Set to countSTART_AT_MAX_COUNT if the semaphore should be created with + its count value set to its max count value, or countSTART_AT_ZERO if it + should have been created with its count value set to 0. */ + unsigned portBASE_TYPE uxExpectedStartCount; + + /* Incremented on each cycle of the demo task. Used to detect a stalled + task. */ + unsigned portBASE_TYPE uxLoopCounter; +} xCountSemStruct; + +/* Two structures are defined, one is passed to each test task. */ +static volatile xCountSemStruct xParameters[ countNUM_TEST_TASKS ]; + +/*-----------------------------------------------------------*/ + +void vStartCountingSemaphoreTasks( void ) +{ + /* Create the semaphores that we are going to use for the test/demo. The + first should be created such that it starts at its maximum count value, + the second should be created such that it starts with a count value of zero. */ + xParameters[ 0 ].xSemaphore = xSemaphoreCreateCounting( countMAX_COUNT_VALUE, countMAX_COUNT_VALUE ); + xParameters[ 0 ].uxExpectedStartCount = countSTART_AT_MAX_COUNT; + xParameters[ 0 ].uxLoopCounter = 0; + + xParameters[ 1 ].xSemaphore = xSemaphoreCreateCounting( countMAX_COUNT_VALUE, 0 ); + xParameters[ 1 ].uxExpectedStartCount = 0; + xParameters[ 1 ].uxLoopCounter = 0; /* vQueueAddToRegistry() adds the semaphore to the registry, if one is in use. The registry is provided as a means for kernel aware @@ -148,159 +148,159 @@ void vStartCountingSemaphoreTasks( void ) vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 0 ].xSemaphore, ( signed portCHAR * ) "Counting_Sem_1" ); vQueueAddToRegistry( ( xQueueHandle ) xParameters[ 1 ].xSemaphore, ( signed portCHAR * ) "Counting_Sem_2" ); - - /* Were the semaphores created? */ - if( ( xParameters[ 0 ].xSemaphore != NULL ) || ( xParameters[ 1 ].xSemaphore != NULL ) ) - { - /* Create the demo tasks, passing in the semaphore to use as the parameter. */ - xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL ); - xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL ); - } -} -/*-----------------------------------------------------------*/ - -static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) -{ -unsigned portBASE_TYPE ux; - - /* If the semaphore count is at its maximum then we should not be able to - 'give' the semaphore. */ - if( xSemaphoreGive( xSemaphore ) == pdPASS ) - { - xErrorDetected = pdTRUE; - } - - /* We should be able to 'take' the semaphore countMAX_COUNT_VALUE times. */ - for( ux = 0; ux < countMAX_COUNT_VALUE; ux++ ) - { - if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) != pdPASS ) - { - /* We expected to be able to take the semaphore. */ - xErrorDetected = pdTRUE; - } - - ( *puxLoopCounter )++; - } - - #if configUSE_PREEMPTION == 0 - taskYIELD(); - #endif - - /* If the semaphore count is zero then we should not be able to 'take' - the semaphore. */ - if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) == pdPASS ) - { - xErrorDetected = pdTRUE; - } -} -/*-----------------------------------------------------------*/ - -static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) -{ -unsigned portBASE_TYPE ux; - - /* If the semaphore count is zero then we should not be able to 'take' - the semaphore. */ - if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) == pdPASS ) - { - xErrorDetected = pdTRUE; - } - - /* We should be able to 'give' the semaphore countMAX_COUNT_VALUE times. */ - for( ux = 0; ux < countMAX_COUNT_VALUE; ux++ ) - { - if( xSemaphoreGive( xSemaphore ) != pdPASS ) - { - /* We expected to be able to take the semaphore. */ - xErrorDetected = pdTRUE; - } - - ( *puxLoopCounter )++; - } - - #if configUSE_PREEMPTION == 0 - taskYIELD(); - #endif - - /* If the semaphore count is at its maximum then we should not be able to - 'give' the semaphore. */ - if( xSemaphoreGive( xSemaphore ) == pdPASS ) - { - xErrorDetected = pdTRUE; - } -} -/*-----------------------------------------------------------*/ - -static void prvCountingSemaphoreTask( void *pvParameters ) -{ -xCountSemStruct *pxParameter; - - #ifdef USE_STDIO - void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend ); - - const portCHAR * const pcTaskStartMsg = "Counting semaphore demo started.\r\n"; - - /* Queue a message for printing to say the task has started. */ - vPrintDisplayMessage( &pcTaskStartMsg ); - #endif - - /* The semaphore to be used was passed as the parameter. */ - pxParameter = ( xCountSemStruct * ) pvParameters; - - /* Did we expect to find the semaphore already at its max count value, or - at zero? */ - if( pxParameter->uxExpectedStartCount == countSTART_AT_MAX_COUNT ) - { - prvDecrementSemaphoreCount( pxParameter->xSemaphore, &( pxParameter->uxLoopCounter ) ); - } - - /* Now we expect the semaphore count to be 0, so this time there is an - error if we can take the semaphore. */ - if( xSemaphoreTake( pxParameter->xSemaphore, 0 ) == pdPASS ) - { - xErrorDetected = pdTRUE; - } - - for( ;; ) - { - prvIncrementSemaphoreCount( pxParameter->xSemaphore, &( pxParameter->uxLoopCounter ) ); - prvDecrementSemaphoreCount( pxParameter->xSemaphore, &( pxParameter->uxLoopCounter ) ); - } -} -/*-----------------------------------------------------------*/ - -portBASE_TYPE xAreCountingSemaphoreTasksStillRunning( void ) -{ -static unsigned portBASE_TYPE uxLastCount0 = 0, uxLastCount1 = 0; -portBASE_TYPE xReturn = pdPASS; - - /* Return fail if any 'give' or 'take' did not result in the expected - behaviour. */ - if( xErrorDetected != pdFALSE ) - { - xReturn = pdFAIL; - } - - /* Return fail if either task is not still incrementing its loop counter. */ - if( uxLastCount0 == xParameters[ 0 ].uxLoopCounter ) - { - xReturn = pdFAIL; - } - else - { - uxLastCount0 = xParameters[ 0 ].uxLoopCounter; - } - - if( uxLastCount1 == xParameters[ 1 ].uxLoopCounter ) - { - xReturn = pdFAIL; - } - else - { - uxLastCount1 = xParameters[ 1 ].uxLoopCounter; - } - - return xReturn; -} - - + + /* Were the semaphores created? */ + if( ( xParameters[ 0 ].xSemaphore != NULL ) || ( xParameters[ 1 ].xSemaphore != NULL ) ) + { + /* Create the demo tasks, passing in the semaphore to use as the parameter. */ + xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL ); + } +} +/*-----------------------------------------------------------*/ + +static void prvDecrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) +{ +unsigned portBASE_TYPE ux; + + /* If the semaphore count is at its maximum then we should not be able to + 'give' the semaphore. */ + if( xSemaphoreGive( xSemaphore ) == pdPASS ) + { + xErrorDetected = pdTRUE; + } + + /* We should be able to 'take' the semaphore countMAX_COUNT_VALUE times. */ + for( ux = 0; ux < countMAX_COUNT_VALUE; ux++ ) + { + if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) != pdPASS ) + { + /* We expected to be able to take the semaphore. */ + xErrorDetected = pdTRUE; + } + + ( *puxLoopCounter )++; + } + + #if configUSE_PREEMPTION == 0 + taskYIELD(); + #endif + + /* If the semaphore count is zero then we should not be able to 'take' + the semaphore. */ + if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) == pdPASS ) + { + xErrorDetected = pdTRUE; + } +} +/*-----------------------------------------------------------*/ + +static void prvIncrementSemaphoreCount( xSemaphoreHandle xSemaphore, unsigned portBASE_TYPE *puxLoopCounter ) +{ +unsigned portBASE_TYPE ux; + + /* If the semaphore count is zero then we should not be able to 'take' + the semaphore. */ + if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) == pdPASS ) + { + xErrorDetected = pdTRUE; + } + + /* We should be able to 'give' the semaphore countMAX_COUNT_VALUE times. */ + for( ux = 0; ux < countMAX_COUNT_VALUE; ux++ ) + { + if( xSemaphoreGive( xSemaphore ) != pdPASS ) + { + /* We expected to be able to take the semaphore. */ + xErrorDetected = pdTRUE; + } + + ( *puxLoopCounter )++; + } + + #if configUSE_PREEMPTION == 0 + taskYIELD(); + #endif + + /* If the semaphore count is at its maximum then we should not be able to + 'give' the semaphore. */ + if( xSemaphoreGive( xSemaphore ) == pdPASS ) + { + xErrorDetected = pdTRUE; + } +} +/*-----------------------------------------------------------*/ + +static void prvCountingSemaphoreTask( void *pvParameters ) +{ +xCountSemStruct *pxParameter; + + #ifdef USE_STDIO + void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend ); + + const portCHAR * const pcTaskStartMsg = "Counting semaphore demo started.\r\n"; + + /* Queue a message for printing to say the task has started. */ + vPrintDisplayMessage( &pcTaskStartMsg ); + #endif + + /* The semaphore to be used was passed as the parameter. */ + pxParameter = ( xCountSemStruct * ) pvParameters; + + /* Did we expect to find the semaphore already at its max count value, or + at zero? */ + if( pxParameter->uxExpectedStartCount == countSTART_AT_MAX_COUNT ) + { + prvDecrementSemaphoreCount( pxParameter->xSemaphore, &( pxParameter->uxLoopCounter ) ); + } + + /* Now we expect the semaphore count to be 0, so this time there is an + error if we can take the semaphore. */ + if( xSemaphoreTake( pxParameter->xSemaphore, 0 ) == pdPASS ) + { + xErrorDetected = pdTRUE; + } + + for( ;; ) + { + prvIncrementSemaphoreCount( pxParameter->xSemaphore, &( pxParameter->uxLoopCounter ) ); + prvDecrementSemaphoreCount( pxParameter->xSemaphore, &( pxParameter->uxLoopCounter ) ); + } +} +/*-----------------------------------------------------------*/ + +portBASE_TYPE xAreCountingSemaphoreTasksStillRunning( void ) +{ +static unsigned portBASE_TYPE uxLastCount0 = 0, uxLastCount1 = 0; +portBASE_TYPE xReturn = pdPASS; + + /* Return fail if any 'give' or 'take' did not result in the expected + behaviour. */ + if( xErrorDetected != pdFALSE ) + { + xReturn = pdFAIL; + } + + /* Return fail if either task is not still incrementing its loop counter. */ + if( uxLastCount0 == xParameters[ 0 ].uxLoopCounter ) + { + xReturn = pdFAIL; + } + else + { + uxLastCount0 = xParameters[ 0 ].uxLoopCounter; + } + + if( uxLastCount1 == xParameters[ 1 ].uxLoopCounter ) + { + xReturn = pdFAIL; + } + else + { + uxLastCount1 = xParameters[ 1 ].uxLoopCounter; + } + + return xReturn; +} + + diff --git a/Demo/Common/Minimal/crflash.c b/Demo/Common/Minimal/crflash.c index 4ae712466..bba54a3fe 100644 --- a/Demo/Common/Minimal/crflash.c +++ b/Demo/Common/Minimal/crflash.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/crhook.c b/Demo/Common/Minimal/crhook.c index ef0ca8863..e22d29c8c 100644 --- a/Demo/Common/Minimal/crhook.c +++ b/Demo/Common/Minimal/crhook.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/death.c b/Demo/Common/Minimal/death.c index be00b2395..adf459567 100644 --- a/Demo/Common/Minimal/death.c +++ b/Demo/Common/Minimal/death.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/dynamic.c b/Demo/Common/Minimal/dynamic.c index 895a127a9..be0b58eba 100644 --- a/Demo/Common/Minimal/dynamic.c +++ b/Demo/Common/Minimal/dynamic.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/flash.c b/Demo/Common/Minimal/flash.c index 7a1aaa013..51a54eb46 100644 --- a/Demo/Common/Minimal/flash.c +++ b/Demo/Common/Minimal/flash.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/flop.c b/Demo/Common/Minimal/flop.c index 46b1919b7..5b0fe29d8 100644 --- a/Demo/Common/Minimal/flop.c +++ b/Demo/Common/Minimal/flop.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/integer.c b/Demo/Common/Minimal/integer.c index b0faca41e..5caed00c6 100644 --- a/Demo/Common/Minimal/integer.c +++ b/Demo/Common/Minimal/integer.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/Minimal/recmutex.c b/Demo/Common/Minimal/recmutex.c index 901aa2afa..b573ff949 100644 --- a/Demo/Common/Minimal/recmutex.c +++ b/Demo/Common/Minimal/recmutex.c @@ -1,131 +1,131 @@ -/* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. - - This file is part of the FreeRTOS.org distribution. - - FreeRTOS.org is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - FreeRTOS.org is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with FreeRTOS.org; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - A special exception to the GPL can be applied should you wish to distribute - a combined work that includes FreeRTOS.org, without being obliged to provide - the source code for any proprietary components. See the licensing section - of http://www.FreeRTOS.org for full details of how and when the exception - can be applied. - - *************************************************************************** - *************************************************************************** - * * - * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, * - * and even write all or part of your application on your behalf. * - * See http://www.OpenRTOS.com for details of the services we provide to * - * expedite your project. * - * * - *************************************************************************** - *************************************************************************** - - Please ensure to read the configuration and relevant port sections of the - online documentation. - - http://www.FreeRTOS.org - Documentation, latest information, license and - contact details. - - http://www.SafeRTOS.com - A version that is certified for use in safety - critical systems. - - http://www.OpenRTOS.com - Commercial support, development, porting, - licensing and training services. -*/ - -/* - The tasks defined on this page demonstrate the use of recursive mutexes. - - For recursive mutex functionality the created mutex should be created using - xSemaphoreCreateRecursiveMutex(), then be manipulated - using the xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() API - functions. - - This demo creates three tasks all of which access the same recursive mutex: - - prvRecursiveMutexControllingTask() has the highest priority so executes - first and grabs the mutex. It then performs some recursive accesses - - between each of which it sleeps for a short period to let the lower - priority tasks execute. When it has completed its demo functionality - it gives the mutex back before suspending itself. - - prvRecursiveMutexBlockingTask() attempts to access the mutex by performing - a blocking 'take'. The blocking task has a lower priority than the - controlling task so by the time it executes the mutex has already been - taken by the controlling task, causing the blocking task to block. It - does not unblock until the controlling task has given the mutex back, - and it does not actually run until the controlling task has suspended - itself (due to the relative priorities). When it eventually does obtain - the mutex all it does is give the mutex back prior to also suspending - itself. At this point both the controlling task and the blocking task are - suspended. - - prvRecursiveMutexPollingTask() runs at the idle priority. It spins round - a tight loop attempting to obtain the mutex with a non-blocking call. As - the lowest priority task it will not successfully obtain the mutex until - both the controlling and blocking tasks are suspended. Once it eventually - does obtain the mutex it first unsuspends both the controlling task and - blocking task prior to giving the mutex back - resulting in the polling - task temporarily inheriting the controlling tasks priority. -*/ - -/* Scheduler include files. */ -#include "FreeRTOS.h" -#include "task.h" -#include "semphr.h" - -/* Demo app include files. */ -#include "recmutex.h" - -/* Priorities assigned to the three tasks. */ -#define recmuCONTROLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) -#define recmuBLOCKING_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) -#define recmuPOLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 0 ) - -/* The recursive call depth. */ -#define recmuMAX_COUNT ( 10 ) - -/* Misc. */ -#define recmuSHORT_DELAY ( 20 / portTICK_RATE_MS ) -#define recmuNO_DELAY ( ( portTickType ) 0 ) -#define recmuTWO_TICK_DELAY ( ( portTickType ) 2 ) - -/* The three tasks as described at the top of this file. */ -static void prvRecursiveMutexControllingTask( void *pvParameters ); -static void prvRecursiveMutexBlockingTask( void *pvParameters ); -static void prvRecursiveMutexPollingTask( void *pvParameters ); - -/* The mutex used by the demo. */ -static xSemaphoreHandle xMutex; - -/* Variables used to detect and latch errors. */ -static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE; -static volatile unsigned portBASE_TYPE uxControllingCycles = 0, uxBlockingCycles, uxPollingCycles = 0; - -/* Handles of the two higher priority tasks, required so they can be resumed -(unsuspended). */ -static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle; - -/*-----------------------------------------------------------*/ - -void vStartRecursiveMutexTasks( void ) -{ - /* Just creates the mutex and the three tasks. */ - +/* + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. + + This file is part of the FreeRTOS.org distribution. + + FreeRTOS.org is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + FreeRTOS.org is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with FreeRTOS.org; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + A special exception to the GPL can be applied should you wish to distribute + a combined work that includes FreeRTOS.org, without being obliged to provide + the source code for any proprietary components. See the licensing section + of http://www.FreeRTOS.org for full details of how and when the exception + can be applied. + + *************************************************************************** + *************************************************************************** + * * + * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, * + * and even write all or part of your application on your behalf. * + * See http://www.OpenRTOS.com for details of the services we provide to * + * expedite your project. * + * * + *************************************************************************** + *************************************************************************** + + Please ensure to read the configuration and relevant port sections of the + online documentation. + + http://www.FreeRTOS.org - Documentation, latest information, license and + contact details. + + http://www.SafeRTOS.com - A version that is certified for use in safety + critical systems. + + http://www.OpenRTOS.com - Commercial support, development, porting, + licensing and training services. +*/ + +/* + The tasks defined on this page demonstrate the use of recursive mutexes. + + For recursive mutex functionality the created mutex should be created using + xSemaphoreCreateRecursiveMutex(), then be manipulated + using the xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() API + functions. + + This demo creates three tasks all of which access the same recursive mutex: + + prvRecursiveMutexControllingTask() has the highest priority so executes + first and grabs the mutex. It then performs some recursive accesses - + between each of which it sleeps for a short period to let the lower + priority tasks execute. When it has completed its demo functionality + it gives the mutex back before suspending itself. + + prvRecursiveMutexBlockingTask() attempts to access the mutex by performing + a blocking 'take'. The blocking task has a lower priority than the + controlling task so by the time it executes the mutex has already been + taken by the controlling task, causing the blocking task to block. It + does not unblock until the controlling task has given the mutex back, + and it does not actually run until the controlling task has suspended + itself (due to the relative priorities). When it eventually does obtain + the mutex all it does is give the mutex back prior to also suspending + itself. At this point both the controlling task and the blocking task are + suspended. + + prvRecursiveMutexPollingTask() runs at the idle priority. It spins round + a tight loop attempting to obtain the mutex with a non-blocking call. As + the lowest priority task it will not successfully obtain the mutex until + both the controlling and blocking tasks are suspended. Once it eventually + does obtain the mutex it first unsuspends both the controlling task and + blocking task prior to giving the mutex back - resulting in the polling + task temporarily inheriting the controlling tasks priority. +*/ + +/* Scheduler include files. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" + +/* Demo app include files. */ +#include "recmutex.h" + +/* Priorities assigned to the three tasks. */ +#define recmuCONTROLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) +#define recmuBLOCKING_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) +#define recmuPOLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 0 ) + +/* The recursive call depth. */ +#define recmuMAX_COUNT ( 10 ) + +/* Misc. */ +#define recmuSHORT_DELAY ( 20 / portTICK_RATE_MS ) +#define recmuNO_DELAY ( ( portTickType ) 0 ) +#define recmuTWO_TICK_DELAY ( ( portTickType ) 2 ) + +/* The three tasks as described at the top of this file. */ +static void prvRecursiveMutexControllingTask( void *pvParameters ); +static void prvRecursiveMutexBlockingTask( void *pvParameters ); +static void prvRecursiveMutexPollingTask( void *pvParameters ); + +/* The mutex used by the demo. */ +static xSemaphoreHandle xMutex; + +/* Variables used to detect and latch errors. */ +static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE; +static volatile unsigned portBASE_TYPE uxControllingCycles = 0, uxBlockingCycles, uxPollingCycles = 0; + +/* Handles of the two higher priority tasks, required so they can be resumed +(unsuspended). */ +static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle; + +/*-----------------------------------------------------------*/ + +void vStartRecursiveMutexTasks( void ) +{ + /* Just creates the mutex and the three tasks. */ + xMutex = xSemaphoreCreateRecursiveMutex(); /* vQueueAddToRegistry() adds the mutex to the registry, if one is @@ -135,231 +135,231 @@ void vStartRecursiveMutexTasks( void ) by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is defined to be less than 1. */ vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Recursive_Mutex" ); - - - if( xMutex != NULL ) - { - xTaskCreate( prvRecursiveMutexControllingTask, ( signed portCHAR * ) "Rec1", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); - xTaskCreate( prvRecursiveMutexBlockingTask, ( signed portCHAR * ) "Rec2", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); - xTaskCreate( prvRecursiveMutexPollingTask, ( signed portCHAR * ) "Rec3", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, NULL ); - } -} -/*-----------------------------------------------------------*/ - -static void prvRecursiveMutexControllingTask( void *pvParameters ) -{ -unsigned portBASE_TYPE ux; + + + if( xMutex != NULL ) + { + xTaskCreate( prvRecursiveMutexControllingTask, ( signed portCHAR * ) "Rec1", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle ); + xTaskCreate( prvRecursiveMutexBlockingTask, ( signed portCHAR * ) "Rec2", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle ); + xTaskCreate( prvRecursiveMutexPollingTask, ( signed portCHAR * ) "Rec3", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, NULL ); + } +} +/*-----------------------------------------------------------*/ + +static void prvRecursiveMutexControllingTask( void *pvParameters ) +{ +unsigned portBASE_TYPE ux; /* Just to remove compiler warning. */ ( void ) pvParameters; - - for( ;; ) - { - /* Should not be able to 'give' the mutex, as we have not yet 'taken' - it. */ - if( xSemaphoreGiveRecursive( xMutex ) == pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - for( ux = 0; ux < recmuMAX_COUNT; ux++ ) - { - /* We should now be able to take the mutex as many times as - we like. A one tick delay is used so the polling task will - inherit our priority on all but the first cycle of this task. - If we did not block attempting to receive the mutex then no - priority inheritance would occur. */ - if( xSemaphoreTakeRecursive( xMutex, recmuTWO_TICK_DELAY ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - /* Ensure the other task attempting to access the mutex (and the - other demo tasks) are able to execute. */ - vTaskDelay( recmuSHORT_DELAY ); - } - - /* For each time we took the mutex, give it back. */ - for( ux = 0; ux < recmuMAX_COUNT; ux++ ) - { - /* Ensure the other task attempting to access the mutex (and the - other demo tasks) are able to execute. */ - vTaskDelay( recmuSHORT_DELAY ); - - /* We should now be able to give the mutex as many times as we - took it. */ - if( xSemaphoreGiveRecursive( xMutex ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - } - - /* Having given it back the same number of times as it was taken, we - should no longer be the mutex owner, so the next give sh ould fail. */ - if( xSemaphoreGiveRecursive( xMutex ) == pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - /* Keep count of the number of cycles this task has performed so a - stall can be detected. */ - uxControllingCycles++; - - /* Suspend ourselves to the blocking task can execute. */ - xControllingIsSuspended = pdTRUE; - vTaskSuspend( NULL ); - xControllingIsSuspended = pdFALSE; - } -} -/*-----------------------------------------------------------*/ - -static void prvRecursiveMutexBlockingTask( void *pvParameters ) + + for( ;; ) + { + /* Should not be able to 'give' the mutex, as we have not yet 'taken' + it. */ + if( xSemaphoreGiveRecursive( xMutex ) == pdPASS ) + { + xErrorOccurred = pdTRUE; + } + + for( ux = 0; ux < recmuMAX_COUNT; ux++ ) + { + /* We should now be able to take the mutex as many times as + we like. A one tick delay is used so the polling task will + inherit our priority on all but the first cycle of this task. + If we did not block attempting to receive the mutex then no + priority inheritance would occur. */ + if( xSemaphoreTakeRecursive( xMutex, recmuTWO_TICK_DELAY ) != pdPASS ) + { + xErrorOccurred = pdTRUE; + } + + /* Ensure the other task attempting to access the mutex (and the + other demo tasks) are able to execute. */ + vTaskDelay( recmuSHORT_DELAY ); + } + + /* For each time we took the mutex, give it back. */ + for( ux = 0; ux < recmuMAX_COUNT; ux++ ) + { + /* Ensure the other task attempting to access the mutex (and the + other demo tasks) are able to execute. */ + vTaskDelay( recmuSHORT_DELAY ); + + /* We should now be able to give the mutex as many times as we + took it. */ + if( xSemaphoreGiveRecursive( xMutex ) != pdPASS ) + { + xErrorOccurred = pdTRUE; + } + } + + /* Having given it back the same number of times as it was taken, we + should no longer be the mutex owner, so the next give sh ould fail. */ + if( xSemaphoreGiveRecursive( xMutex ) == pdPASS ) + { + xErrorOccurred = pdTRUE; + } + + /* Keep count of the number of cycles this task has performed so a + stall can be detected. */ + uxControllingCycles++; + + /* Suspend ourselves to the blocking task can execute. */ + xControllingIsSuspended = pdTRUE; + vTaskSuspend( NULL ); + xControllingIsSuspended = pdFALSE; + } +} +/*-----------------------------------------------------------*/ + +static void prvRecursiveMutexBlockingTask( void *pvParameters ) { /* Just to remove compiler warning. */ ( void ) pvParameters; - - for( ;; ) - { - /* Attempt to obtain the mutex. We should block until the - controlling task has given up the mutex, and not actually execute - past this call until the controlling task is suspended. */ - if( xSemaphoreTakeRecursive( xMutex, portMAX_DELAY ) == pdPASS ) - { - if( xControllingIsSuspended != pdTRUE ) - { - /* Did not expect to execute until the controlling task was - suspended. */ - xErrorOccurred = pdTRUE; - } - else - { - /* Give the mutex back before suspending ourselves to allow - the polling task to obtain the mutex. */ - if( xSemaphoreGiveRecursive( xMutex ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - - xBlockingIsSuspended = pdTRUE; - vTaskSuspend( NULL ); - xBlockingIsSuspended = pdFALSE; - } - } - else - { - /* We should not leave the xSemaphoreTakeRecursive() function - until the mutex was obtained. */ - xErrorOccurred = pdTRUE; - } - - /* The controlling and blocking tasks should be in lock step. */ - if( uxControllingCycles != ( uxBlockingCycles + 1 ) ) - { - xErrorOccurred = pdTRUE; - } - - /* Keep count of the number of cycles this task has performed so a - stall can be detected. */ - uxBlockingCycles++; - } -} -/*-----------------------------------------------------------*/ - -static void prvRecursiveMutexPollingTask( void *pvParameters ) + + for( ;; ) + { + /* Attempt to obtain the mutex. We should block until the + controlling task has given up the mutex, and not actually execute + past this call until the controlling task is suspended. */ + if( xSemaphoreTakeRecursive( xMutex, portMAX_DELAY ) == pdPASS ) + { + if( xControllingIsSuspended != pdTRUE ) + { + /* Did not expect to execute until the controlling task was + suspended. */ + xErrorOccurred = pdTRUE; + } + else + { + /* Give the mutex back before suspending ourselves to allow + the polling task to obtain the mutex. */ + if( xSemaphoreGiveRecursive( xMutex ) != pdPASS ) + { + xErrorOccurred = pdTRUE; + } + + xBlockingIsSuspended = pdTRUE; + vTaskSuspend( NULL ); + xBlockingIsSuspended = pdFALSE; + } + } + else + { + /* We should not leave the xSemaphoreTakeRecursive() function + until the mutex was obtained. */ + xErrorOccurred = pdTRUE; + } + + /* The controlling and blocking tasks should be in lock step. */ + if( uxControllingCycles != ( uxBlockingCycles + 1 ) ) + { + xErrorOccurred = pdTRUE; + } + + /* Keep count of the number of cycles this task has performed so a + stall can be detected. */ + uxBlockingCycles++; + } +} +/*-----------------------------------------------------------*/ + +static void prvRecursiveMutexPollingTask( void *pvParameters ) { - /* Just to remove compiler warning. */ - ( void ) pvParameters; - - for( ;; ) - { - /* Keep attempting to obtain the mutex. We should only obtain it when - the blocking task has suspended itself. */ - if( xSemaphoreTakeRecursive( xMutex, recmuNO_DELAY ) == pdPASS ) - { - /* Is the blocking task suspended? */ - if( xBlockingIsSuspended != pdTRUE ) - { - xErrorOccurred = pdTRUE; - } - else - { - /* Keep count of the number of cycles this task has performed so - a stall can be detected. */ - uxPollingCycles++; - - /* We can resume the other tasks here even though they have a - higher priority than the polling task. When they execute they - will attempt to obtain the mutex but fail because the polling - task is still the mutex holder. The polling task (this task) - will then inherit the higher priority. */ - vTaskResume( xBlockingTaskHandle ); - vTaskResume( xControllingTaskHandle ); - - /* Release the mutex, disinheriting the higher priority again. */ - if( xSemaphoreGiveRecursive( xMutex ) != pdPASS ) - { - xErrorOccurred = pdTRUE; - } - } - } - - #if configUSE_PREEMPTION == 0 - { - taskYIELD(); - } - #endif - } -} -/*-----------------------------------------------------------*/ - -/* This is called to check that all the created tasks are still running. */ -portBASE_TYPE xAreRecursiveMutexTasksStillRunning( void ) -{ -portBASE_TYPE xReturn; -static unsigned portBASE_TYPE uxLastControllingCycles = 0, uxLastBlockingCycles = 0, uxLastPollingCycles = 0; - - /* Is the controlling task still cycling? */ - if( uxLastControllingCycles == uxControllingCycles ) - { - xErrorOccurred = pdTRUE; - } - else - { - uxLastControllingCycles = uxControllingCycles; - } - - /* Is the blocking task still cycling? */ - if( uxLastBlockingCycles == uxBlockingCycles ) - { - xErrorOccurred = pdTRUE; - } - else - { - uxLastBlockingCycles = uxBlockingCycles; - } - - /* Is the polling task still cycling? */ - if( uxLastPollingCycles == uxPollingCycles ) - { - xErrorOccurred = pdTRUE; - } - else - { - uxLastPollingCycles = uxPollingCycles; - } - - if( xErrorOccurred == pdTRUE ) - { - xReturn = pdFAIL; - } - else - { - xReturn = pdTRUE; - } - - return xReturn; -} - - - - + /* Just to remove compiler warning. */ + ( void ) pvParameters; + + for( ;; ) + { + /* Keep attempting to obtain the mutex. We should only obtain it when + the blocking task has suspended itself. */ + if( xSemaphoreTakeRecursive( xMutex, recmuNO_DELAY ) == pdPASS ) + { + /* Is the blocking task suspended? */ + if( xBlockingIsSuspended != pdTRUE ) + { + xErrorOccurred = pdTRUE; + } + else + { + /* Keep count of the number of cycles this task has performed so + a stall can be detected. */ + uxPollingCycles++; + + /* We can resume the other tasks here even though they have a + higher priority than the polling task. When they execute they + will attempt to obtain the mutex but fail because the polling + task is still the mutex holder. The polling task (this task) + will then inherit the higher priority. */ + vTaskResume( xBlockingTaskHandle ); + vTaskResume( xControllingTaskHandle ); + + /* Release the mutex, disinheriting the higher priority again. */ + if( xSemaphoreGiveRecursive( xMutex ) != pdPASS ) + { + xErrorOccurred = pdTRUE; + } + } + } + + #if configUSE_PREEMPTION == 0 + { + taskYIELD(); + } + #endif + } +} +/*-----------------------------------------------------------*/ + +/* This is called to check that all the created tasks are still running. */ +portBASE_TYPE xAreRecursiveMutexTasksStillRunning( void ) +{ +portBASE_TYPE xReturn; +static unsigned portBASE_TYPE uxLastControllingCycles = 0, uxLastBlockingCycles = 0, uxLastPollingCycles = 0; + + /* Is the controlling task still cycling? */ + if( uxLastControllingCycles == uxControllingCycles ) + { + xErrorOccurred = pdTRUE; + } + else + { + uxLastControllingCycles = uxControllingCycles; + } + + /* Is the blocking task still cycling? */ + if( uxLastBlockingCycles == uxBlockingCycles ) + { + xErrorOccurred = pdTRUE; + } + else + { + uxLastBlockingCycles = uxBlockingCycles; + } + + /* Is the polling task still cycling? */ + if( uxLastPollingCycles == uxPollingCycles ) + { + xErrorOccurred = pdTRUE; + } + else + { + uxLastPollingCycles = uxPollingCycles; + } + + if( xErrorOccurred == pdTRUE ) + { + xReturn = pdFAIL; + } + else + { + xReturn = pdTRUE; + } + + return xReturn; +} + + + + diff --git a/Demo/Common/Minimal/semtest.c b/Demo/Common/Minimal/semtest.c index 5158b9a9e..424c0b432 100644 --- a/Demo/Common/Minimal/semtest.c +++ b/Demo/Common/Minimal/semtest.c @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. @@ -155,6 +155,15 @@ const portTickType xBlockTime = ( portTickType ) 100; xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( xTaskHandle * ) NULL ); } } + + /* vQueueAddToRegistry() adds the semaphore to the registry, if one is + in use. The registry is provided as a means for kernel aware + debuggers to locate semaphores and has no purpose if a kernel aware debugger + is not being used. The call to vQueueAddToRegistry() will be removed + by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is + defined to be less than 1. */ + vQueueAddToRegistry( ( xQueueHandle ) pxFirstSemaphoreParameters->xSemaphore, ( signed portCHAR * ) "Counting_Sem_1" ); + vQueueAddToRegistry( ( xQueueHandle ) pxSecondSemaphoreParameters->xSemaphore, ( signed portCHAR * ) "Counting_Sem_2" ); } /*-----------------------------------------------------------*/ diff --git a/Demo/Common/include/AltBlckQ.h b/Demo/Common/include/AltBlckQ.h index 31befc5fa..56559987a 100644 --- a/Demo/Common/include/AltBlckQ.h +++ b/Demo/Common/include/AltBlckQ.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/AltBlock.h b/Demo/Common/include/AltBlock.h index a8e0bff5b..6a0ce03cb 100644 --- a/Demo/Common/include/AltBlock.h +++ b/Demo/Common/include/AltBlock.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/AltPollQ.h b/Demo/Common/include/AltPollQ.h index 53370378f..4d40724e8 100644 --- a/Demo/Common/include/AltPollQ.h +++ b/Demo/Common/include/AltPollQ.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/AltQTest.h b/Demo/Common/include/AltQTest.h index 27d5e7bcb..97d06f01e 100644 --- a/Demo/Common/include/AltQTest.h +++ b/Demo/Common/include/AltQTest.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/BlockQ.h b/Demo/Common/include/BlockQ.h index a7ad7152f..853cb45ab 100644 --- a/Demo/Common/include/BlockQ.h +++ b/Demo/Common/include/BlockQ.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/GenQTest.h b/Demo/Common/include/GenQTest.h index f350b7ada..14266aa33 100644 --- a/Demo/Common/include/GenQTest.h +++ b/Demo/Common/include/GenQTest.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/IntQueue.h b/Demo/Common/include/IntQueue.h index 017b02fbe..969bcb1c7 100644 --- a/Demo/Common/include/IntQueue.h +++ b/Demo/Common/include/IntQueue.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/PollQ.h b/Demo/Common/include/PollQ.h index c64d78196..f3197fb76 100644 --- a/Demo/Common/include/PollQ.h +++ b/Demo/Common/include/PollQ.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/QPeek.h b/Demo/Common/include/QPeek.h index 0c776505d..e634b5999 100644 --- a/Demo/Common/include/QPeek.h +++ b/Demo/Common/include/QPeek.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/blocktim.h b/Demo/Common/include/blocktim.h index ba40892ac..fd4ebd1c3 100644 --- a/Demo/Common/include/blocktim.h +++ b/Demo/Common/include/blocktim.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/comtest.h b/Demo/Common/include/comtest.h index e71b2a14b..8838aa768 100644 --- a/Demo/Common/include/comtest.h +++ b/Demo/Common/include/comtest.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/comtest2.h b/Demo/Common/include/comtest2.h index 2ada9b239..9b1d4dab2 100644 --- a/Demo/Common/include/comtest2.h +++ b/Demo/Common/include/comtest2.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/countsem.h b/Demo/Common/include/countsem.h index 559a02374..afc81e033 100644 --- a/Demo/Common/include/countsem.h +++ b/Demo/Common/include/countsem.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/crflash.h b/Demo/Common/include/crflash.h index 4b0ed06e2..feae9d90c 100644 --- a/Demo/Common/include/crflash.h +++ b/Demo/Common/include/crflash.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/crhook.h b/Demo/Common/include/crhook.h index e66423ac3..4f4c9daac 100644 --- a/Demo/Common/include/crhook.h +++ b/Demo/Common/include/crhook.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/death.h b/Demo/Common/include/death.h index 92e1d6f9f..cbe5dae7c 100644 --- a/Demo/Common/include/death.h +++ b/Demo/Common/include/death.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/dynamic.h b/Demo/Common/include/dynamic.h index 3070a47c0..636bdcb50 100644 --- a/Demo/Common/include/dynamic.h +++ b/Demo/Common/include/dynamic.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/fileIO.h b/Demo/Common/include/fileIO.h index 97ad88424..6d01f5f89 100644 --- a/Demo/Common/include/fileIO.h +++ b/Demo/Common/include/fileIO.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/flash.h b/Demo/Common/include/flash.h index f330aa2c0..195d35ce0 100644 --- a/Demo/Common/include/flash.h +++ b/Demo/Common/include/flash.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/flop.h b/Demo/Common/include/flop.h index d4ec16daf..43620f809 100644 --- a/Demo/Common/include/flop.h +++ b/Demo/Common/include/flop.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/integer.h b/Demo/Common/include/integer.h index 7a5937db3..2bd33182e 100644 --- a/Demo/Common/include/integer.h +++ b/Demo/Common/include/integer.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/mevents.h b/Demo/Common/include/mevents.h index 131bdd121..f57c15009 100644 --- a/Demo/Common/include/mevents.h +++ b/Demo/Common/include/mevents.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/partest.h b/Demo/Common/include/partest.h index f800b0616..3aafbf216 100644 --- a/Demo/Common/include/partest.h +++ b/Demo/Common/include/partest.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/print.h b/Demo/Common/include/print.h index 6bb63dd7f..76e23a0d5 100644 --- a/Demo/Common/include/print.h +++ b/Demo/Common/include/print.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/recmutex.h b/Demo/Common/include/recmutex.h index 1a69d3cbd..fdb957b02 100644 --- a/Demo/Common/include/recmutex.h +++ b/Demo/Common/include/recmutex.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/semtest.h b/Demo/Common/include/semtest.h index 1f19191d0..0b058c490 100644 --- a/Demo/Common/include/semtest.h +++ b/Demo/Common/include/semtest.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution. diff --git a/Demo/Common/include/serial.h b/Demo/Common/include/serial.h index 5d8939a87..ddf18bfa0 100644 --- a/Demo/Common/include/serial.h +++ b/Demo/Common/include/serial.h @@ -1,5 +1,5 @@ /* - FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry. + FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry. This file is part of the FreeRTOS.org distribution.