diff --git a/Documentation/guides/fork_vfork_migration.rst b/Documentation/guides/fork_vfork_migration.rst index 1124fba1fd9..e93d5656c83 100644 --- a/Documentation/guides/fork_vfork_migration.rst +++ b/Documentation/guides/fork_vfork_migration.rst @@ -42,7 +42,7 @@ There are now three distinct primitives: * - ``task_fork()`` - child shares memory, private stack copy - runs concurrently - - ``CONFIG_ARCH_HAVE_TASK_FORK`` -- exactly where ``fork()`` existed + - ``CONFIG_TASK_FORK`` -- on by default exactly where ``fork()`` existed before ``task_fork()`` is the old behaviour under an honest name. Nothing was lost. @@ -122,6 +122,13 @@ Configuration symbols Inherits exactly the ``select`` lines that ``ARCH_HAVE_FORK`` used to have, so no configuration that had ``fork()`` loses the machinery. +``CONFIG_TASK_FORK`` + Provide ``task_fork()``. Defaults to ``y`` wherever + ``ARCH_HAVE_TASK_FORK`` is selected, so no configuration that had ``fork()`` + loses the primitive. Turn it off to leave a NuttX extension out of a build + that does not call it; the architecture entry point, the system call and the + libc stub go with it. ``vfork()`` and ``fork()`` are unaffected. + ``CONFIG_ARCH_HAVE_VFORK`` Hidden. The architecture can implement POSIX ``vfork()``. diff --git a/Documentation/reference/user/01_task_control.rst b/Documentation/reference/user/01_task_control.rst index 67b86677148..76efebe90a3 100644 --- a/Documentation/reference/user/01_task_control.rst +++ b/Documentation/reference/user/01_task_control.rst @@ -435,10 +435,10 @@ Functions under the name ``fork()`` before these three interfaces were separated, and it is preserved here under an honest name so that nothing is lost. - NOTE: available where ``CONFIG_ARCH_HAVE_TASK_FORK`` is selected, which - is exactly the set of configurations that had ``fork()`` before the - split. New code should prefer :c:func:`pthread_create`, which is the - same memory relationship spelled clearly, or :c:func:`posix_spawn`; + NOTE: available where ``CONFIG_TASK_FORK`` is enabled, which defaults to + the set of configurations that had ``fork()`` before the split, and can + be turned off. New code should prefer :c:func:`pthread_create`, which + is the same memory relationship spelled clearly, or :c:func:`posix_spawn`; ``task_fork()`` exists to give the historical behaviour a truthful name, not to recommend it. diff --git a/arch/Kconfig b/arch/Kconfig index bda523cba47..564f3b81bff 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -534,10 +534,27 @@ config ARCH_HAVE_FORK Where this is not selected fork() is not provided at all, and code that calls it fails to build -- see FORK_IS_TASK_FORK. +config TASK_FORK + bool "Provide task_fork()" + default y + depends on ARCH_HAVE_TASK_FORK + ---help--- + Provide task_fork(), which clones the calling task: the child shares + the parent's .data/.bss/heap, runs on a private copy of the parent's + stack, and runs concurrently with the parent. This is the historical + NuttX fork() behaviour under its own name. It is not POSIX, and it is + neither fork() nor vfork(). + + Disable this to leave it out where nothing calls it. The saving is + small -- the architecture's entry point, the system call and the libc + stub -- but the primitive is a NuttX extension, so a configuration + that does not want it need not carry it. vfork() and fork() are + unaffected; each is selected on its own. + config FORK_IS_TASK_FORK bool "Provide fork() as an alias for task_fork() (legacy)" default n - depends on ARCH_HAVE_TASK_FORK && !ARCH_HAVE_FORK + depends on TASK_FORK && !ARCH_HAVE_FORK ---help--- Provide fork() on configurations that cannot implement POSIX fork() semantics, by aliasing it to task_fork(). diff --git a/arch/arm/src/common/gnu/fork.S b/arch/arm/src/common/gnu/fork.S index 6f3004304ff..77d5b7e13e1 100644 --- a/arch/arm/src/common/gnu/fork.S +++ b/arch/arm/src/common/gnu/fork.S @@ -78,7 +78,7 @@ * ****************************************************************************/ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl up_task_fork #ifdef __ghs__ .type up_task_fork, $function diff --git a/arch/arm/src/common/iar/fork.S b/arch/arm/src/common/iar/fork.S index f9dc057e392..b63711a0eb6 100644 --- a/arch/arm/src/common/iar/fork.S +++ b/arch/arm/src/common/iar/fork.S @@ -39,7 +39,7 @@ * Public Symbols ****************************************************************************/ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK PUBLIC up_task_fork #endif #ifdef CONFIG_ARCH_HAVE_VFORK @@ -100,7 +100,7 @@ THUMB -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK up_task_fork: movs r2, #FORK_TYPE_TASK b arm_fork_common diff --git a/arch/arm64/src/common/arm64_fork_func.S b/arch/arm64/src/common/arm64_fork_func.S index 992099e39fc..8e28f11696a 100644 --- a/arch/arm64/src/common/arm64_fork_func.S +++ b/arch/arm64/src/common/arm64_fork_func.S @@ -84,7 +84,7 @@ * ****************************************************************************/ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK GTEXT(up_task_fork) SECTION_FUNC(text, up_task_fork) mov x1, #FORK_TYPE_TASK diff --git a/arch/mips/src/mips32/fork.S b/arch/mips/src/mips32/fork.S index 6bd5f22b21f..3b26f28d164 100644 --- a/arch/mips/src/mips32/fork.S +++ b/arch/mips/src/mips32/fork.S @@ -93,7 +93,7 @@ .set micromips #endif -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl up_task_fork .type up_task_fork, function .ent up_task_fork diff --git a/arch/risc-v/src/common/CMakeLists.txt b/arch/risc-v/src/common/CMakeLists.txt index 2e6ccf65c02..2541813f391 100644 --- a/arch/risc-v/src/common/CMakeLists.txt +++ b/arch/risc-v/src/common/CMakeLists.txt @@ -86,7 +86,7 @@ if(CONFIG_STACK_COLORATION) list(APPEND SRCS riscv_checkstack.c) endif() -if(CONFIG_ARCH_HAVE_TASK_FORK +if(CONFIG_TASK_FORK OR CONFIG_ARCH_HAVE_VFORK OR CONFIG_ARCH_HAVE_FORK) list(APPEND SRCS fork.S riscv_fork.c) diff --git a/arch/risc-v/src/common/Make.defs b/arch/risc-v/src/common/Make.defs index aabff1ed99d..8db5cc23a27 100644 --- a/arch/risc-v/src/common/Make.defs +++ b/arch/risc-v/src/common/Make.defs @@ -86,7 +86,7 @@ ifeq ($(CONFIG_STACK_COLORATION),y) CMN_CSRCS += riscv_checkstack.c endif -ifneq ($(CONFIG_ARCH_HAVE_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) +ifneq ($(CONFIG_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) CMN_ASRCS += fork.S CMN_CSRCS += riscv_fork.c endif diff --git a/arch/risc-v/src/common/fork.S b/arch/risc-v/src/common/fork.S index 76acd88bd53..08eebe2c173 100644 --- a/arch/risc-v/src/common/fork.S +++ b/arch/risc-v/src/common/fork.S @@ -39,7 +39,7 @@ .file "fork.S" .globl riscv_fork -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl up_task_fork #endif #ifdef CONFIG_ARCH_HAVE_VFORK @@ -89,7 +89,7 @@ * ****************************************************************************/ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .type up_task_fork, function up_task_fork: diff --git a/arch/risc-v/src/common/riscv_fork.c b/arch/risc-v/src/common/riscv_fork.c index ddcc7b2588c..fdf37192824 100644 --- a/arch/risc-v/src/common/riscv_fork.c +++ b/arch/risc-v/src/common/riscv_fork.c @@ -41,7 +41,7 @@ #include "sched/sched.h" -#if defined(CONFIG_ARCH_HAVE_TASK_FORK) || defined(CONFIG_ARCH_HAVE_VFORK) || \ +#if defined(CONFIG_TASK_FORK) || defined(CONFIG_ARCH_HAVE_VFORK) || \ defined(CONFIG_ARCH_HAVE_FORK) /**************************************************************************** @@ -351,5 +351,5 @@ pid_t riscv_fork(const struct fork_s *context, int type) } #endif /* CONFIG_LIB_SYSCALL */ -#endif /* CONFIG_ARCH_HAVE_TASK_FORK || CONFIG_ARCH_HAVE_VFORK || +#endif /* CONFIG_TASK_FORK || CONFIG_ARCH_HAVE_VFORK || * CONFIG_ARCH_HAVE_FORK */ diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index c71e986845c..79a4c1e9585 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -95,7 +95,7 @@ ifeq ($(CONFIG_SCHED_BACKTRACE),y) CSRCS += sim_backtrace.c endif -ifneq ($(CONFIG_ARCH_HAVE_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) +ifneq ($(CONFIG_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) CSRCS += sim_fork.c endif diff --git a/arch/sim/src/sim/CMakeLists.txt b/arch/sim/src/sim/CMakeLists.txt index 101b9411961..32e9e2b14e4 100644 --- a/arch/sim/src/sim/CMakeLists.txt +++ b/arch/sim/src/sim/CMakeLists.txt @@ -82,7 +82,7 @@ if(CONFIG_SCHED_BACKTRACE) list(APPEND SRCS sim_backtrace.c) endif() -if(CONFIG_ARCH_HAVE_TASK_FORK +if(CONFIG_TASK_FORK OR CONFIG_ARCH_HAVE_VFORK OR CONFIG_ARCH_HAVE_FORK) list(APPEND SRCS sim_fork.c) diff --git a/arch/sim/src/sim/sim_fork.c b/arch/sim/src/sim/sim_fork.c index e94c6fe71a2..ed9be7bcfea 100644 --- a/arch/sim/src/sim/sim_fork.c +++ b/arch/sim/src/sim/sim_fork.c @@ -190,7 +190,7 @@ static pid_t sim_fork_internal(const xcpt_reg_t *context, int type) * ****************************************************************************/ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK pid_t sim_task_fork(const xcpt_reg_t *context) { return sim_fork_internal(context, FORK_TYPE_TASK); diff --git a/arch/sim/src/sim/sim_fork_arm.S b/arch/sim/src/sim/sim_fork_arm.S index 10032044d25..75140cd9168 100644 --- a/arch/sim/src/sim/sim_fork_arm.S +++ b/arch/sim/src/sim/sim_fork_arm.S @@ -99,7 +99,7 @@ .text -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl up_task_fork .type up_task_fork, @function up_task_fork: @@ -114,7 +114,7 @@ up_task_fork: add sp, sp, #XCPTCONTEXT_SIZE bx lr .size up_task_fork, . - up_task_fork -#endif /* CONFIG_ARCH_HAVE_TASK_FORK */ +#endif /* CONFIG_TASK_FORK */ #ifdef CONFIG_ARCH_HAVE_VFORK .globl up_vfork diff --git a/arch/sim/src/sim/sim_fork_arm64.S b/arch/sim/src/sim/sim_fork_arm64.S index 4c8f93f4499..53dd743129d 100644 --- a/arch/sim/src/sim/sim_fork_arm64.S +++ b/arch/sim/src/sim/sim_fork_arm64.S @@ -110,7 +110,7 @@ .text .align 4 -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl SYMBOL(up_task_fork) SYMBOL(up_task_fork): @@ -132,7 +132,7 @@ SYMBOL(up_task_fork): ldp x29, x30, [sp] /* restore FP/LR register */ ret -#endif /* CONFIG_ARCH_HAVE_TASK_FORK */ +#endif /* CONFIG_TASK_FORK */ #ifdef CONFIG_ARCH_HAVE_VFORK .globl SYMBOL(up_vfork) diff --git a/arch/sim/src/sim/sim_fork_x86.S b/arch/sim/src/sim/sim_fork_x86.S index ab460b03c15..629e58eefa6 100644 --- a/arch/sim/src/sim/sim_fork_x86.S +++ b/arch/sim/src/sim/sim_fork_x86.S @@ -107,7 +107,7 @@ .text -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl SYMBOL(up_task_fork) #ifdef __ELF__ .type SYMBOL(up_task_fork), @function @@ -127,7 +127,7 @@ SYMBOL(up_task_fork): #ifdef __ELF__ .size SYMBOL(up_task_fork), . - SYMBOL(up_task_fork) #endif -#endif /* CONFIG_ARCH_HAVE_TASK_FORK */ +#endif /* CONFIG_TASK_FORK */ #ifdef CONFIG_ARCH_HAVE_VFORK .globl SYMBOL(up_vfork) diff --git a/arch/sim/src/sim/sim_fork_x86_64.S b/arch/sim/src/sim/sim_fork_x86_64.S index 92a2bc4630e..1d54285673e 100644 --- a/arch/sim/src/sim/sim_fork_x86_64.S +++ b/arch/sim/src/sim/sim_fork_x86_64.S @@ -107,7 +107,7 @@ .text -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl SYMBOL(up_task_fork) #ifdef __ELF__ .type SYMBOL(up_task_fork), @function @@ -132,7 +132,7 @@ SYMBOL(up_task_fork): #ifdef __ELF__ .size SYMBOL(up_task_fork), . - SYMBOL(up_task_fork) #endif -#endif /* CONFIG_ARCH_HAVE_TASK_FORK */ +#endif /* CONFIG_TASK_FORK */ #ifdef CONFIG_ARCH_HAVE_VFORK .globl SYMBOL(up_vfork) diff --git a/arch/x86_64/src/common/CMakeLists.txt b/arch/x86_64/src/common/CMakeLists.txt index e9c320af977..9322d4c9148 100644 --- a/arch/x86_64/src/common/CMakeLists.txt +++ b/arch/x86_64/src/common/CMakeLists.txt @@ -34,7 +34,7 @@ set(SRCS x86_64_tcbinfo.c x86_64_tlb.c) -if(CONFIG_ARCH_HAVE_TASK_FORK +if(CONFIG_TASK_FORK OR CONFIG_ARCH_HAVE_VFORK OR CONFIG_ARCH_HAVE_FORK) list(APPEND SRCS x86_64_fork.c fork.S) diff --git a/arch/x86_64/src/common/Make.defs b/arch/x86_64/src/common/Make.defs index 4c5c8f2bab4..818a8ae159e 100644 --- a/arch/x86_64/src/common/Make.defs +++ b/arch/x86_64/src/common/Make.defs @@ -29,7 +29,7 @@ CMN_CSRCS += x86_64_getintstack.c x86_64_initialize.c x86_64_nputs.c CMN_CSRCS += x86_64_modifyreg8.c x86_64_modifyreg16.c x86_64_modifyreg32.c CMN_CSRCS += x86_64_switchcontext.c x86_64_tlb.c -ifneq ($(CONFIG_ARCH_HAVE_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) +ifneq ($(CONFIG_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) CMN_CSRCS += x86_64_fork.c CMN_ASRCS += fork.S endif diff --git a/arch/x86_64/src/common/fork.S b/arch/x86_64/src/common/fork.S index 602ded522fe..40eb4c3e397 100644 --- a/arch/x86_64/src/common/fork.S +++ b/arch/x86_64/src/common/fork.S @@ -95,7 +95,7 @@ * | ......... | */ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK .globl up_task_fork .type up_task_fork, @function diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 01c412094ca..8536539ad9d 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -265,7 +265,7 @@ extern initializer_t _einit[]; * ****************************************************************************/ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK pid_t up_task_fork(void); #endif diff --git a/include/sched.h b/include/sched.h index a30362f337f..64fc7b0ed2a 100644 --- a/include/sched.h +++ b/include/sched.h @@ -239,7 +239,7 @@ int task_restart(pid_t pid); * posix_spawn(). */ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK pid_t task_fork(void); #endif diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h index 5f7b338e6da..df95fdca672 100644 --- a/include/sys/syscall_lookup.h +++ b/include/sys/syscall_lookup.h @@ -112,7 +112,7 @@ SYSCALL_LOOKUP(nxsem_wait_slow, 1) /* The following can be individually enabled */ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK SYSCALL_LOOKUP(up_task_fork, 0) #endif diff --git a/libs/libc/libc.csv b/libs/libc/libc.csv index 2f4ae6faa41..1c42bd91848 100644 --- a/libs/libc/libc.csv +++ b/libs/libc/libc.csv @@ -326,7 +326,7 @@ "swprintf","wchar.h","","int","FAR wchar_t *","size_t","FAR const wchar_t *","..." "sysconf","unistd.h","","long","int" "syslog","syslog.h","","void","int","FAR const IPTR char *","..." -"task_fork","sched.h","!defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_ARCH_HAVE_TASK_FORK)","pid_t" +"task_fork","sched.h","!defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_TASK_FORK)","pid_t" "task_testcancel","sched.h","defined(CONFIG_CANCELLATION_POINTS)","void" "task_tls_alloc","nuttx/tls.h","!defined(CONFIG_BUILD_KERNEL) && CONFIG_TLS_TASK_NELEM > 0","int","tls_dtor_t" "task_tls_get_value","nuttx/tls.h","CONFIG_TLS_TASK_NELEM > 0","uintptr_t","int" diff --git a/libs/libc/unistd/CMakeLists.txt b/libs/libc/unistd/CMakeLists.txt index 2e074fd65d9..ccbca578a10 100644 --- a/libs/libc/unistd/CMakeLists.txt +++ b/libs/libc/unistd/CMakeLists.txt @@ -102,7 +102,7 @@ if(NOT CONFIG_DISABLE_MOUNTPOINTS) list(APPEND SRCS lib_truncate.c lib_posix_fallocate.c) endif() -if(CONFIG_ARCH_HAVE_TASK_FORK +if(CONFIG_TASK_FORK OR CONFIG_ARCH_HAVE_VFORK OR CONFIG_ARCH_HAVE_FORK) list(APPEND SRCS lib_fork.c) diff --git a/libs/libc/unistd/Make.defs b/libs/libc/unistd/Make.defs index 8cc5e26f57d..475b7958bd1 100644 --- a/libs/libc/unistd/Make.defs +++ b/libs/libc/unistd/Make.defs @@ -53,7 +53,7 @@ ifneq ($(CONFIG_DISABLE_MOUNTPOINTS),y) CSRCS += lib_truncate.c lib_posix_fallocate.c endif -ifneq ($(CONFIG_ARCH_HAVE_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) +ifneq ($(CONFIG_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) CSRCS += lib_fork.c endif diff --git a/libs/libc/unistd/lib_fork.c b/libs/libc/unistd/lib_fork.c index ebc9e2ea8b7..b13b9926cfa 100644 --- a/libs/libc/unistd/lib_fork.c +++ b/libs/libc/unistd/lib_fork.c @@ -35,7 +35,7 @@ #include #include -#if defined(CONFIG_ARCH_HAVE_TASK_FORK) || defined(CONFIG_ARCH_HAVE_VFORK) || \ +#if defined(CONFIG_TASK_FORK) || defined(CONFIG_ARCH_HAVE_VFORK) || \ defined(CONFIG_ARCH_HAVE_FORK) /**************************************************************************** @@ -154,7 +154,7 @@ static void atfork_parent(void) * ****************************************************************************/ -#ifdef CONFIG_ARCH_HAVE_TASK_FORK +#ifdef CONFIG_TASK_FORK pid_t task_fork(void) { pid_t pid; @@ -177,7 +177,7 @@ pid_t task_fork(void) return pid; } -#endif /* CONFIG_ARCH_HAVE_TASK_FORK */ +#endif /* CONFIG_TASK_FORK */ /**************************************************************************** * Name: vfork @@ -280,5 +280,5 @@ pid_t fork(void) } #endif -#endif /* CONFIG_ARCH_HAVE_TASK_FORK || CONFIG_ARCH_HAVE_VFORK || +#endif /* CONFIG_TASK_FORK || CONFIG_ARCH_HAVE_VFORK || * CONFIG_ARCH_HAVE_FORK */ diff --git a/sched/task/CMakeLists.txt b/sched/task/CMakeLists.txt index bcbb24fac7a..2f0c2785df8 100644 --- a/sched/task/CMakeLists.txt +++ b/sched/task/CMakeLists.txt @@ -46,7 +46,7 @@ if(CONFIG_SCHED_HAVE_PARENT) list(APPEND SRCS task_getppid.c task_reparent.c) endif() -if(CONFIG_ARCH_HAVE_TASK_FORK +if(CONFIG_TASK_FORK OR CONFIG_ARCH_HAVE_VFORK OR CONFIG_ARCH_HAVE_FORK) list(APPEND SRCS task_fork.c) diff --git a/sched/task/Make.defs b/sched/task/Make.defs index 283e30f8dfd..d84bf3df415 100644 --- a/sched/task/Make.defs +++ b/sched/task/Make.defs @@ -30,7 +30,7 @@ ifeq ($(CONFIG_SCHED_HAVE_PARENT),y) CSRCS += task_getppid.c task_reparent.c endif -ifneq ($(CONFIG_ARCH_HAVE_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) +ifneq ($(CONFIG_TASK_FORK)$(CONFIG_ARCH_HAVE_VFORK)$(CONFIG_ARCH_HAVE_FORK),) CSRCS += task_fork.c endif diff --git a/sched/task/task_fork.c b/sched/task/task_fork.c index 53c1bb6d8a3..c8012375922 100644 --- a/sched/task/task_fork.c +++ b/sched/task/task_fork.c @@ -49,7 +49,7 @@ * built if the architecture can provide any one of them. */ -#if defined(CONFIG_ARCH_HAVE_TASK_FORK) || defined(CONFIG_ARCH_HAVE_VFORK) || \ +#if defined(CONFIG_TASK_FORK) || defined(CONFIG_ARCH_HAVE_VFORK) || \ defined(CONFIG_ARCH_HAVE_FORK) /**************************************************************************** @@ -649,5 +649,5 @@ void nxtask_abort_fork(FAR struct tcb_s *child, int errcode) set_errno(errcode); } -#endif /* CONFIG_ARCH_HAVE_TASK_FORK || CONFIG_ARCH_HAVE_VFORK || +#endif /* CONFIG_TASK_FORK || CONFIG_ARCH_HAVE_VFORK || * CONFIG_ARCH_HAVE_FORK */ diff --git a/syscall/syscall.csv b/syscall/syscall.csv index ad5a08d97d1..05cd29c92d1 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -199,7 +199,7 @@ "unlink","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *" "unsetenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *" "up_fork","nuttx/arch.h","defined(CONFIG_ARCH_HAVE_FORK)","pid_t" -"up_task_fork","nuttx/arch.h","defined(CONFIG_ARCH_HAVE_TASK_FORK)","pid_t" +"up_task_fork","nuttx/arch.h","defined(CONFIG_TASK_FORK)","pid_t" "up_vfork","nuttx/arch.h","defined(CONFIG_ARCH_HAVE_VFORK)","pid_t" "utimens","sys/stat.h","","int","FAR const char *","const struct timespec [2]|FAR const struct timespec *" "wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","FAR int *"