diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-09 12:55:13 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-09 12:55:13 +0000 |
commit | 8156a2bed16d732d2489f7d6fe410b110c29b1d5 (patch) | |
tree | 9c78e5873d7cf77b3479315a96d18fabfa86f718 /nuttx/libc | |
parent | 3f4d20628887f3d76705262fcbf18315bc31ea18 (diff) | |
download | px4-firmware-8156a2bed16d732d2489f7d6fe410b110c29b1d5.tar.gz px4-firmware-8156a2bed16d732d2489f7d6fe410b110c29b1d5.tar.bz2 px4-firmware-8156a2bed16d732d2489f7d6fe410b110c29b1d5.zip |
Use kconfig- prefix to avoid tool name conflicts (from Jose Pablo Carballo)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5496 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/libc')
-rw-r--r-- | nuttx/libc/Kconfig | 28 | ||||
-rw-r--r-- | nuttx/libc/Makefile | 1 | ||||
-rw-r--r-- | nuttx/libc/spawn/Make.defs | 46 |
3 files changed, 63 insertions, 12 deletions
diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig index 699b3ebb2..d739b6351 100644 --- a/nuttx/libc/Kconfig +++ b/nuttx/libc/Kconfig @@ -72,15 +72,17 @@ config EOL_IS_EITHER_CRLF endchoice config LIBC_EXECFUNCS - bool "Enable exec[l|v] Support" + bool "Enable exec[l|v] / posix_spawn() Support" default n depends on !BINFMT_DISABLE ---help--- Enable support for the exec[l|v] family of functions that can be - used to start other programs, terminating the current program. - Typical usage is (1) first call vfork() to create a new thread, then - (2) call exec[l|v] to replace the new thread with a program from the - file system. + used to start other programs, terminating the current program and + the posix_spawn() familty of functions that can be used start other + programs without terminating the current program. The typical + usage of the exec[l|v] functions is (1) first call vfork() to create + a new thread, then (2) call exec[l|v] to replace the new thread with + a program from the file system. NOTE 1: This two step process start is completely unnecessary in NuttX and is provided only for compatibily with Unix systems. These @@ -89,9 +91,11 @@ config LIBC_EXECFUNCS the new thread will be terminated by the exec[l|v] call, it really served no purpose other than to suport Unix compatility. - NOTE 2: Support for exec[l|v] is conditional because is requires - additional support for symbol tables that will not be available in - the typical system. + The posix_spawn() functions do not have this inefficiency. + + NOTE 2: Support for exec[l|v] and posix_spawn() is conditional + because they require additional support for symbol tables that + will not be available in the typical system. if LIBC_EXECFUNCS @@ -99,8 +103,8 @@ config EXECFUNCS_SYMTAB string "Symbol table used by exec[l|v]" default "g_symtab" ---help--- - The exec[l|v] functions are wrapper functions that (1) call the non- - standard binfmt function 'exec', and then (2) exit(0). The binfmt + The exec[l|v] and posix_spawn() functions are wrapper functions that + call the non-standard binfmt function 'exec'). The binfmt function 'exec' needs to have (1) a symbol table that provides the list of symbols exported by the base code, and (2) the number of symbols in that table. This selection provides the name of that @@ -110,8 +114,8 @@ config EXECFUNCS_NSYMBOLS int "Number of Symbols in the Table" default 0 ---help--- - The exec[l|v] functions are wrapper functions that (1) call the non- - standard binfmt function 'exec', and then (2) exit(0). The binfmt + The exec[l|v] and posix_spawn() functions are wrapper functions that + call the non-standard binfmt function 'exec'). The binfmt function 'exec' needs to have (1) a symbol table that provides the list of symbols exported by the base code, and (2) the number of symbols in that table. This selection provides the number of diff --git a/nuttx/libc/Makefile b/nuttx/libc/Makefile index 22dbba1d9..a76620585 100644 --- a/nuttx/libc/Makefile +++ b/nuttx/libc/Makefile @@ -57,6 +57,7 @@ include time/Make.defs include libgen/Make.defs include dirent/Make.defs include termios/Make.defs +include spawn/Make.defs include queue/Make.defs include misc/Make.defs diff --git a/nuttx/libc/spawn/Make.defs b/nuttx/libc/spawn/Make.defs new file mode 100644 index 000000000..17d9f393a --- /dev/null +++ b/nuttx/libc/spawn/Make.defs @@ -0,0 +1,46 @@ +############################################################################ +# libc/spawn/Make.defs +# +# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt <gnutt@nuttx.org> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +# Add the spawn C files to the build + +ifeq ($(CONFIG_LIBC_EXECFUNCS),y) + +CSRCS += + +# Add the spawn directory to the build + +DEPPATH += --dep-path spawn +VPATH += :spawn +endif |