From 30a0cdf33e96e5ad31d46caeb23ad9e29fdc9199 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 2 Feb 2013 23:56:54 +0000 Subject: [PATCH] Correct a memory leak in NSH git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5600 42af7a65-404d-4744-a932-0658087f49c3 --- configs/amber/README.txt | 2 +- configs/avr32dev1/README.txt | 2 +- configs/cloudctrl/README.txt | 2 +- configs/demo9s12ne64/README.txt | 2 +- configs/ea3131/README.txt | 2 +- configs/ea3152/README.txt | 2 +- configs/eagle100/README.txt | 2 +- configs/ekk-lm3s9b96/README.txt | 2 +- configs/fire-stm32v2/README.txt | 2 +- configs/hymini-stm32v/README.txt | 2 +- configs/kwikstik-k40/README.txt | 2 +- configs/lincoln60/README.txt | 2 +- configs/lm3s6432-s2e/README.txt | 2 +- configs/lm3s6965-ek/README.txt | 2 +- configs/lm3s8962-ek/README.txt | 2 +- configs/lpc4330-xplorer/README.txt | 2 +- configs/lpcxpresso-lpc1768/README.txt | 2 +- configs/mbed/README.txt | 2 +- configs/mcu123-lpc214x/README.txt | 2 +- configs/micropendous3/README.txt | 2 +- configs/mirtoo/README.txt | 2 +- configs/mx1ads/README.txt | 2 +- configs/ne64badge/README.txt | 2 +- configs/ntosd-dm320/README.txt | 2 +- configs/nucleus2g/README.txt | 2 +- configs/olimex-lpc1766stk/README.txt | 2 +- configs/pcblogic-pic32mx/README.txt | 4 +-- configs/pcblogic-pic32mx/src/up_lcd1602.c | 34 +++++++++++------------ configs/pic32-starterkit/README.txt | 2 +- configs/pic32mx7mmb/README.txt | 2 +- configs/sam3u-ek/README.txt | 2 +- configs/shenzhou/README.txt | 2 +- configs/stm3210e-eval/README.txt | 2 +- configs/stm3220g-eval/README.txt | 2 +- configs/stm3240g-eval/README.txt | 2 +- configs/stm32f100rc_generic/README.txt | 2 +- configs/stm32f4discovery/README.txt | 2 +- configs/sure-pic32mx/README.txt | 2 +- configs/teensy/README.txt | 2 +- configs/twr-k60n512/README.txt | 2 +- configs/ubw32/README.txt | 2 +- configs/us7032evb1/README.txt | 2 +- configs/vsn/README.txt | 2 +- configs/zp214xpa/README.txt | 2 +- fs/fat/fs_fat32.c | 14 +++++++++- sched/sched_getfiles.c | 16 +++++++++-- sched/task_posixspawn.c | 12 +++++++- sched/task_spawn.c | 27 +++++++++++++----- 48 files changed, 119 insertions(+), 72 deletions(-) diff --git a/configs/amber/README.txt b/configs/amber/README.txt index 9f40dcdd2b..7f1771886b 100644 --- a/configs/amber/README.txt +++ b/configs/amber/README.txt @@ -490,7 +490,7 @@ Amber Web Server Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Amber Web Server configuration is maintained in a sudirectory and can +Each Amber Web Server configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/avr32dev1/README.txt b/configs/avr32dev1/README.txt index 1f52ff0c2c..3583efee77 100644 --- a/configs/avr32dev1/README.txt +++ b/configs/avr32dev1/README.txt @@ -431,7 +431,7 @@ AVR32DEV1 Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Atmel AVR32DEV configuration is maintained in a sudirectory and +Each Atmel AVR32DEV configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/cloudctrl/README.txt b/configs/cloudctrl/README.txt index f931f3a12a..116bf6b53b 100644 --- a/configs/cloudctrl/README.txt +++ b/configs/cloudctrl/README.txt @@ -726,7 +726,7 @@ Cloudctrl-specific Configuration Options Configurations ============== -Each Cloudctrl configuration is maintained in a sudirectory and +Each Cloudctrl configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/demo9s12ne64/README.txt b/configs/demo9s12ne64/README.txt index a9579e9097..96872f9806 100644 --- a/configs/demo9s12ne64/README.txt +++ b/configs/demo9s12ne64/README.txt @@ -358,7 +358,7 @@ HCS12/DEMO9S12NEC64-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Freescale HCS12 configuration is maintained in a sudirectory and +Each Freescale HCS12 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/ea3131/README.txt b/configs/ea3131/README.txt index f11caab4f9..c04cf8999e 100644 --- a/configs/ea3131/README.txt +++ b/configs/ea3131/README.txt @@ -605,7 +605,7 @@ ARM/EA3131-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each EA3131 configuration is maintained in a sudirectory and can be +Each EA3131 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/ea3152/README.txt b/configs/ea3152/README.txt index 8ede86b4f6..793df4367f 100644 --- a/configs/ea3152/README.txt +++ b/configs/ea3152/README.txt @@ -411,7 +411,7 @@ ARM/EA3152-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each EA3152 configuration is maintained in a sudirectory and can be +Each EA3152 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/eagle100/README.txt b/configs/eagle100/README.txt index 8ed581e98a..a2d79b43d5 100644 --- a/configs/eagle100/README.txt +++ b/configs/eagle100/README.txt @@ -383,7 +383,7 @@ Eagle100-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Eagle-100 configuration is maintained in a sudirectory and +Each Eagle-100 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/ekk-lm3s9b96/README.txt b/configs/ekk-lm3s9b96/README.txt index 01aa1496cd..dfd212854a 100644 --- a/configs/ekk-lm3s9b96/README.txt +++ b/configs/ekk-lm3s9b96/README.txt @@ -402,7 +402,7 @@ Configurations ^^^^^^^^^^^^^^ Each Stellaris EKK-LM3S9b96 Evaluation Kit configuration is maintained in a -sudirectory and can be selected as follow: +sub-directory and can be selected as follow: cd tools ./configure.sh ekk-lm3s9b96/ diff --git a/configs/fire-stm32v2/README.txt b/configs/fire-stm32v2/README.txt index d12a9b27d6..101657f640 100644 --- a/configs/fire-stm32v2/README.txt +++ b/configs/fire-stm32v2/README.txt @@ -810,7 +810,7 @@ M3 Wildfire-specific Configuration Options Configurations ============== -Each M3 Wildfire configuration is maintained in a sudirectory and +Each M3 Wildfire configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/hymini-stm32v/README.txt b/configs/hymini-stm32v/README.txt index 9b063d0ffa..0613e7e032 100644 --- a/configs/hymini-stm32v/README.txt +++ b/configs/hymini-stm32v/README.txt @@ -560,7 +560,7 @@ HY-Mini specific Configuration Options Configurations ============== -Each HY-MiniSTM32V configuration is maintained in a sudirectory and +Each HY-MiniSTM32V configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/kwikstik-k40/README.txt b/configs/kwikstik-k40/README.txt index 98e738d803..e4170de9b8 100644 --- a/configs/kwikstik-k40/README.txt +++ b/configs/kwikstik-k40/README.txt @@ -511,7 +511,7 @@ KwikStik-K40-specific Configuration Options Configurations ============== -Each KwikStik-K40 configuration is maintained in a sudirectory and +Each KwikStik-K40 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/lincoln60/README.txt b/configs/lincoln60/README.txt index 159753890e..ad35c11c36 100644 --- a/configs/lincoln60/README.txt +++ b/configs/lincoln60/README.txt @@ -473,7 +473,7 @@ the mountpoint /mnt/flash. Configurations ^^^^^^^^^^^^^^ -Each Lincoln 60 configuration is maintained in a sudirectory and can be selected +Each Lincoln 60 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/lm3s6432-s2e/README.txt b/configs/lm3s6432-s2e/README.txt index 7241856b05..357c6b56e3 100644 --- a/configs/lm3s6432-s2e/README.txt +++ b/configs/lm3s6432-s2e/README.txt @@ -405,7 +405,7 @@ Configurations ^^^^^^^^^^^^^^ Each Stellaris MDL-S2E Reference Design configuration is maintained in a -sudirectory and can be selected as follow: +sub-directory and can be selected as follow: cd tools ./configure.sh lm3s6432-s2e/ diff --git a/configs/lm3s6965-ek/README.txt b/configs/lm3s6965-ek/README.txt index 94cf4d9021..cae3503651 100644 --- a/configs/lm3s6965-ek/README.txt +++ b/configs/lm3s6965-ek/README.txt @@ -545,7 +545,7 @@ Configurations ^^^^^^^^^^^^^^ Each Stellaris LM3S6965 Evaluation Kit configuration is maintained in a -sudirectory and can be selected as follow: +sub-directory and can be selected as follow: cd tools ./configure.sh lm3s6965-ek/ diff --git a/configs/lm3s8962-ek/README.txt b/configs/lm3s8962-ek/README.txt index e8a0091c6c..82135e809f 100644 --- a/configs/lm3s8962-ek/README.txt +++ b/configs/lm3s8962-ek/README.txt @@ -449,7 +449,7 @@ Configurations ^^^^^^^^^^^^^^ Each Stellaris LM3S8962 Evaluation Kit configuration is maintained in a -sudirectory and can be selected as follow: +sub-directory and can be selected as follow: cd tools ./configure.sh lm3s8962-ek/ diff --git a/configs/lpc4330-xplorer/README.txt b/configs/lpc4330-xplorer/README.txt index 65f3820099..a88758d6cb 100644 --- a/configs/lpc4330-xplorer/README.txt +++ b/configs/lpc4330-xplorer/README.txt @@ -893,7 +893,7 @@ LPC4330-Xplorer Configuration Options Configurations ============== -Each LPC4330-Xplorer configuration is maintained in a sudirectory and can be selected +Each LPC4330-Xplorer configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/lpcxpresso-lpc1768/README.txt b/configs/lpcxpresso-lpc1768/README.txt index 1d9c0cbc26..f45c1ccc26 100644 --- a/configs/lpcxpresso-lpc1768/README.txt +++ b/configs/lpcxpresso-lpc1768/README.txt @@ -734,7 +734,7 @@ LPCXpresso Configuration Options Configurations ^^^^^^^^^^^^^^ -Each LPCXpresso configuration is maintained in a sudirectory and can be +Each LPCXpresso configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/mbed/README.txt b/configs/mbed/README.txt index a5390a1d74..604838e282 100644 --- a/configs/mbed/README.txt +++ b/configs/mbed/README.txt @@ -444,7 +444,7 @@ the mountpoint /mnt/flash. Configurations ^^^^^^^^^^^^^^ -Each mbed configuration is maintained in a sudirectory and can be selected +Each mbed configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/mcu123-lpc214x/README.txt b/configs/mcu123-lpc214x/README.txt index 1c6c9bde86..1acade72e3 100644 --- a/configs/mcu123-lpc214x/README.txt +++ b/configs/mcu123-lpc214x/README.txt @@ -320,7 +320,7 @@ ARM/LPC214X-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each NXP LPC214x configuration is maintained in a sudirectory and +Each NXP LPC214x configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/micropendous3/README.txt b/configs/micropendous3/README.txt index 6b586bd64d..298a4aa467 100644 --- a/configs/micropendous3/README.txt +++ b/configs/micropendous3/README.txt @@ -510,7 +510,7 @@ Micropendous3 Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Micropendous3 configuration is maintained in a sudirectory and can +Each Micropendous3 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/mirtoo/README.txt b/configs/mirtoo/README.txt index 6d3ea234e5..e5b33a9b5c 100644 --- a/configs/mirtoo/README.txt +++ b/configs/mirtoo/README.txt @@ -849,7 +849,7 @@ PIC32MX Configuration Options Configurations ============== -Each PIC32MX configuration is maintained in a sudirectory and can be +Each PIC32MX configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/mx1ads/README.txt b/configs/mx1ads/README.txt index 661d4e8120..e2ecd74d36 100644 --- a/configs/mx1ads/README.txt +++ b/configs/mx1ads/README.txt @@ -121,7 +121,7 @@ ARM/i.MX1-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each MX1ADS configuration is maintained in a sudirectory and +Each MX1ADS configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/ne64badge/README.txt b/configs/ne64badge/README.txt index 34e8a6dc55..83ae75027a 100644 --- a/configs/ne64badge/README.txt +++ b/configs/ne64badge/README.txt @@ -465,7 +465,7 @@ HCS12/NE64BADGE-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Freescale HCS12 configuration is maintained in a sudirectory and +Each Freescale HCS12 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/ntosd-dm320/README.txt b/configs/ntosd-dm320/README.txt index 675716154c..0335d7124a 100644 --- a/configs/ntosd-dm320/README.txt +++ b/configs/ntosd-dm320/README.txt @@ -282,7 +282,7 @@ ARM/DM320-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Neuros OSD configuration is maintained in a sudirectory and +Each Neuros OSD configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/nucleus2g/README.txt b/configs/nucleus2g/README.txt index e915e8bdd0..d1b3a8f9aa 100644 --- a/configs/nucleus2g/README.txt +++ b/configs/nucleus2g/README.txt @@ -521,7 +521,7 @@ Configurations ^^^^^^^^^^^^^^ Each Nucleus 2G configuration is maintained in a -sudirectory and can be selected as follow: +sub-directory and can be selected as follow: cd tools ./configure.sh nucleus2g/ diff --git a/configs/olimex-lpc1766stk/README.txt b/configs/olimex-lpc1766stk/README.txt index 990d1141a5..005f62dc9c 100644 --- a/configs/olimex-lpc1766stk/README.txt +++ b/configs/olimex-lpc1766stk/README.txt @@ -849,7 +849,7 @@ Configurations ^^^^^^^^^^^^^^ Each Olimex LPC1766-STK configuration is maintained in a -sudirectory and can be selected as follow: +sub-directory and can be selected as follow: cd tools ./configure.sh olimex-lpc1766stk/ diff --git a/configs/pcblogic-pic32mx/README.txt b/configs/pcblogic-pic32mx/README.txt index bd81f0c423..5fd4ba6f26 100644 --- a/configs/pcblogic-pic32mx/README.txt +++ b/configs/pcblogic-pic32mx/README.txt @@ -159,7 +159,7 @@ MAX3232 Connection RX -- Pin 52: U1RX/RF2 GND -- POWER POINT: GND Vcc -- POWER POINT: Vdd (3.3V) -- Or P32_VBUS (+5V) - -- Or +5V from a USB PC port. + Or +5V from a USB PC port. Toolchains ========== @@ -524,7 +524,7 @@ PIC32MX Configuration Options Configurations ============== -Each PIC32MX configuration is maintained in a sudirectory and can be +Each PIC32MX configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/pcblogic-pic32mx/src/up_lcd1602.c b/configs/pcblogic-pic32mx/src/up_lcd1602.c index 3f99baee1f..b8af46ee72 100644 --- a/configs/pcblogic-pic32mx/src/up_lcd1602.c +++ b/configs/pcblogic-pic32mx/src/up_lcd1602.c @@ -40,25 +40,25 @@ /* LCD pin mapping (see configs/pcblogic-pic32mx/README.txt) * * ----------------------------------- ---------- ---------------------------------- - * PIC32 LCD1602 UBW32 PIN + * PIC32 LCD1602 PCBLogic PIN * PIN SIGNAL NAME PIN NAME(s) * ----------------------------------- ---------- ---------------------------------- - * 1. Vss GND - * 2. Vdd Vcc (5V) - * 3. Vee To ground via 10K potentiometer - * 4 AN15/OCFB/PMALL/PMA0/CN12/RB15 4. RS PMA0, Selects registers - * 82 PMRD/CN14/RD5 5. RW PMRD/PMWR, Selects read or write - * 81 OC5/PMWR/CN13/RD4 6. E PMENB, Starts data read/write - * 93 PMD0/RE0 7. D0 PMD0 - * 94 PMD1/RE1 8. D1 PMD1 - * 98 PMD2/RE2 9. D2 PMD2 - * 99 PMD3/RE3 10. D3 PMD3 - * 100 PMD4/RE4 11. D4 PMD4 - * 3 PMD5/RE5 12. D5 PMD5 - * 4 PMD6/RE6 13. D6 PMD6 - * 5 PMD7/RE7 14. D7 PMD7 - * 15. A To Vcc (5V) via 10K potentiometer - * 16. K GND + * 1. Vss --> Powerpoint GND + * 2. Vdd --> Powerpoint USB+5V + * 3. Vee N/C To ground via 10K potentiometer + * 4 AN15/OCFB/PMALL/PMA0/CN12/RB15 4. RS 4 PMA0, Selects registers + * 82 PMRD/CN14/RD5 5. RW 82 PMRD/PMWR, Selects read or write + * 81 OC5/PMWR/CN13/RD4 6. E 81 PMENB, Starts data read/write + * 93 PMD0/RE0 7. D0 93 PMD0 + * 94 PMD1/RE1 8. D1 94 PMD1 + * 98 PMD2/RE2 9. D2 98 PMD2 + * 99 PMD3/RE3 10. D3 99 PMD3 + * 100 PMD4/RE4 11. D4 100 PMD4 + * 3 PMD5/RE5 12. D5 3 PMD5 + * 4 PMD6/RE6 13. D6 4 PMD6 + * 5 PMD7/RE7 14. D7 5 PMD7 + * 15. A N/C To Vcc (5V) via 10K potentiometer + * 16. K --> Powerpoint GND * ----------------------------------- ---------- ---------------------------------- */ diff --git a/configs/pic32-starterkit/README.txt b/configs/pic32-starterkit/README.txt index ea82a166b2..6a1f6b4c18 100644 --- a/configs/pic32-starterkit/README.txt +++ b/configs/pic32-starterkit/README.txt @@ -1021,7 +1021,7 @@ PIC32MX specific PHY/Ethernet device driver settings Configurations ============== -Each PIC32MX configuration is maintained in a sudirectory and can be +Each PIC32MX configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/pic32mx7mmb/README.txt b/configs/pic32mx7mmb/README.txt index 2112065255..8701ac170a 100644 --- a/configs/pic32mx7mmb/README.txt +++ b/configs/pic32mx7mmb/README.txt @@ -599,7 +599,7 @@ PIC32MX specific PHY/Ethernet device driver settings Configurations ============== -Each PIC32MX configuration is maintained in a sudirectory and can be +Each PIC32MX configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/sam3u-ek/README.txt b/configs/sam3u-ek/README.txt index d8d1908046..d892931008 100644 --- a/configs/sam3u-ek/README.txt +++ b/configs/sam3u-ek/README.txt @@ -355,7 +355,7 @@ SAM3U-EK-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each SAM3U-EK configuration is maintained in a sudirectory and +Each SAM3U-EK configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/shenzhou/README.txt b/configs/shenzhou/README.txt index a15d2f9152..df360ff8af 100644 --- a/configs/shenzhou/README.txt +++ b/configs/shenzhou/README.txt @@ -743,7 +743,7 @@ Shenzhou-specific Configuration Options Configurations ============== -Each Shenzhou configuration is maintained in a sudirectory and +Each Shenzhou configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/stm3210e-eval/README.txt b/configs/stm3210e-eval/README.txt index f494e9e9ab..789a599d16 100644 --- a/configs/stm3210e-eval/README.txt +++ b/configs/stm3210e-eval/README.txt @@ -680,7 +680,7 @@ STM3210E-EVAL-specific Configuration Options Configurations ============== -Each STM3210E-EVAL configuration is maintained in a sudirectory and +Each STM3210E-EVAL configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/stm3220g-eval/README.txt b/configs/stm3220g-eval/README.txt index 40c918582d..679049e82f 100644 --- a/configs/stm3220g-eval/README.txt +++ b/configs/stm3220g-eval/README.txt @@ -776,7 +776,7 @@ STM3220G-EVAL-specific Configuration Options Configurations ============== -Each STM3220G-EVAL configuration is maintained in a sudirectory and +Each STM3220G-EVAL configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/stm3240g-eval/README.txt b/configs/stm3240g-eval/README.txt index e8a3c4b257..485ce12ff7 100644 --- a/configs/stm3240g-eval/README.txt +++ b/configs/stm3240g-eval/README.txt @@ -912,7 +912,7 @@ STM3240G-EVAL-specific Configuration Options Configurations ============== -Each STM3240G-EVAL configuration is maintained in a sudirectory and +Each STM3240G-EVAL configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/stm32f100rc_generic/README.txt b/configs/stm32f100rc_generic/README.txt index 951fb31305..01af178a6b 100644 --- a/configs/stm32f100rc_generic/README.txt +++ b/configs/stm32f100rc_generic/README.txt @@ -454,7 +454,7 @@ configured on pins PA3 and PA2, respectively. Configurations ============== -Each STMicro STM32F100RC generic configuration is maintained in a sudirectory +Each STMicro STM32F100RC generic configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/stm32f4discovery/README.txt b/configs/stm32f4discovery/README.txt index 25a7700125..5629d8c4a0 100644 --- a/configs/stm32f4discovery/README.txt +++ b/configs/stm32f4discovery/README.txt @@ -1003,7 +1003,7 @@ STM32F4Discovery-specific Configuration Options Configurations ============== -Each STM32F4Discovery configuration is maintained in a sudirectory and +Each STM32F4Discovery configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/sure-pic32mx/README.txt b/configs/sure-pic32mx/README.txt index 403fe42baf..a3721e2deb 100644 --- a/configs/sure-pic32mx/README.txt +++ b/configs/sure-pic32mx/README.txt @@ -596,7 +596,7 @@ PIC32MX Configuration Options Configurations ============== -Each PIC32MX configuration is maintained in a sudirectory and can be +Each PIC32MX configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/teensy/README.txt b/configs/teensy/README.txt index 23e7d6c986..df1cad81af 100644 --- a/configs/teensy/README.txt +++ b/configs/teensy/README.txt @@ -513,7 +513,7 @@ Teensy++ Configuration Options Configurations ^^^^^^^^^^^^^^ -Each Teensy++ configuration is maintained in a sudirectory and can +Each Teensy++ configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/twr-k60n512/README.txt b/configs/twr-k60n512/README.txt index a9db7a1f77..5fb00a2f94 100644 --- a/configs/twr-k60n512/README.txt +++ b/configs/twr-k60n512/README.txt @@ -645,7 +645,7 @@ TWR-K60N512-specific Configuration Options Configurations ============== -Each TWR-K60N512 configuration is maintained in a sudirectory and +Each TWR-K60N512 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/ubw32/README.txt b/configs/ubw32/README.txt index 63cb1bb54b..5c41b8275a 100644 --- a/configs/ubw32/README.txt +++ b/configs/ubw32/README.txt @@ -569,7 +569,7 @@ PIC32MX Configuration Options Configurations ============== -Each PIC32MX configuration is maintained in a sudirectory and can be +Each PIC32MX configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/us7032evb1/README.txt b/configs/us7032evb1/README.txt index 0a25790bad..6821cc425b 100644 --- a/configs/us7032evb1/README.txt +++ b/configs/us7032evb1/README.txt @@ -55,7 +55,7 @@ shterm Configurations ^^^^^^^^^^^^^^ -Each SH-1 configuration is maintained in a sudirectory and +Each SH-1 configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/vsn/README.txt b/configs/vsn/README.txt index debc3e8ad4..3331f0cd55 100644 --- a/configs/vsn/README.txt +++ b/configs/vsn/README.txt @@ -290,7 +290,7 @@ VSN-specific Configuration Options Configurations ^^^^^^^^^^^^^^ -Each VSN configuration is maintained in a sudirectory and +Each VSN configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/configs/zp214xpa/README.txt b/configs/zp214xpa/README.txt index 88d03b9de8..7ccfcaf3d0 100644 --- a/configs/zp214xpa/README.txt +++ b/configs/zp214xpa/README.txt @@ -282,7 +282,7 @@ Using OpenOCD and GDB with an FT2232 JTAG emulator Configurations: =============== - Each NXP LPC214x configuration is maintained in a sudirectory and + Each NXP LPC214x configuration is maintained in a sub-directory and can be selected as follow: cd tools diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c index df8962b517..7202bb63d5 100644 --- a/fs/fat/fs_fat32.c +++ b/fs/fat/fs_fat32.c @@ -637,9 +637,21 @@ static ssize_t fat_write(FAR struct file *filep, const char *buffer, int sectorindex; int ret; - /* Sanity checks */ + /* Sanity checks. I have seen the following assertion misfire if + * CONFIG_DEBUG_MM is enabled while re-directing output to a + * file. In this case, the debug output can get generated while + * the file is being opened, FAT data structures are being allocated, + * and things are generally in a perverse state. + */ +#ifdef CONFIG_DEBUG_MM + if (filep->f_priv == NULL || filep->f_inode == NULL) + { + return -ENXIO; + } +#else DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); +#endif /* Recover our private data from the struct file instance */ diff --git a/sched/sched_getfiles.c b/sched/sched_getfiles.c index 17ca2bbf6e..95f5c44ec6 100644 --- a/sched/sched_getfiles.c +++ b/sched/sched_getfiles.c @@ -72,8 +72,20 @@ FAR struct filelist *sched_getfiles(void) FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; FAR struct task_group_s *group = rtcb->group; - DEBUGASSERT(group); - return &group->tg_filelist; + /* The group may be NULL under certain conditions. For example, if + * debug output is attempted from the IDLE thead before the group has + * been allocated. I have only seen this case when memory management + * debug is enabled. + */ + + if (group) + { + return &group->tg_filelist; + } + + /* Higher level logic must handle the NULL gracefully */ + + return NULL; } #endif /* CONFIG_NFILE_DESCRIPTORS */ diff --git a/sched/task_posixspawn.c b/sched/task_posixspawn.c index f263915009..1b3afdaf37 100644 --- a/sched/task_posixspawn.c +++ b/sched/task_posixspawn.c @@ -166,6 +166,16 @@ errout: * Description: * Perform file_actions, then execute the task from the file system. * + * Do we really need this proxy task? Isn't that wasteful? + * + * Q: Why not use a starthook so that there is callout from task_start() + * to perform these operations after the file is loaded from + * the file system? + * A: That existing task_starthook() implementation cannot be used in + * this context; any of task_starthook() will also conflict with + * binfmt's use of the start hook to call C++ static initializers. + * task_restart() would also be an issue. + * * Input Parameters: * Standard task start-up parameters * @@ -399,7 +409,7 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path, return errcode; } - /* Disable pre-emption so that the proxy does not run until we waitpid + /* Disable pre-emption so that the proxy does not run until waitpid * is called. This is probably unnecessary since the posix_spawn_proxy has * the same priority as this thread; it should be schedule behind this * task in the ready-to-run list. diff --git a/sched/task_spawn.c b/sched/task_spawn.c index 04a3944bf3..61a835c914 100644 --- a/sched/task_spawn.c +++ b/sched/task_spawn.c @@ -110,8 +110,6 @@ static int task_spawn_exec(FAR pid_t *pidp, FAR const char *name, int pid; int ret = OK; - DEBUGASSERT(path); - /* Disable pre-emption so that we can modify the task parameters after * we start the new task; the new task will not actually begin execution * until we re-enable pre-emption. @@ -159,6 +157,23 @@ errout: * Description: * Perform file_actions, then execute the task from the file system. * + * Do we really need a proxy task in this case? Isn't that wasteful? + * + * Q: Why can we do what we need to do here and the just call the + * new task's entry point. + * A: This would require setting up the name, priority, and stacksize from + * the task_spawn, but it do-able. The only issue I can think of is + * that NuttX supports task_restart(), and you would never be able to + * restart a task from this point. + * + * Q: Why not use a starthook so that there is callout from task_start() + * to perform these operations? + * A: Good idea, except that existing task_starthook() implementation + * cannot be used here unless we get rid of task_create and, instead, + * use task_init() and task_activate(). start_taskhook() could then + * be called between task_init() and task)activate(). task_restart() + * would still be an issue. + * * Input Parameters: * Standard task start-up parameters * @@ -303,10 +318,8 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, #endif int ret; - DEBUGASSERT(path); - - svdbg("pid=%p path=%s file_actions=%p attr=%p argv=%p\n", - pid, path, file_actions, attr, argv); + svdbg("pid=%p name=%s entry=%p file_actions=%p attr=%p argv=%p\n", + pid, name, entry, file_actions, attr, argv); /* If there are no file actions to be performed and there is no change to * the signal mask, then start the new child task directly from the parent task. @@ -359,7 +372,7 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, return errcode; } - /* Disable pre-emption so that the proxy does not run until we waitpid + /* Disable pre-emption so that the proxy does not run until waitpid * is called. This is probably unnecessary since the task_spawn_proxy has * the same priority as this thread; it should be schedule behind this * task in the ready-to-run list.