mirror of
https://github.com/apache/nuttx.git
synced 2026-08-10 06:55:13 +00:00
task_fork() is a NuttX extension, not POSIX, and a configuration that does not call it has no reason to carry it. Add CONFIG_TASK_FORK to leave it out. It depends on ARCH_HAVE_TASK_FORK and defaults to y, so it is enabled exactly where fork() existed before the split and no configuration loses the primitive by upgrading. ARCH_HAVE_TASK_FORK keeps its meaning -- the architecture *can* clone the calling task -- and the new symbol says whether this build wants it. Everything that provides task_fork() moves to the new symbol: the declaration in sched.h, up_task_fork() in arch.h, the two .csv entries that generate the system call stub and proxy, the syscall_lookup.h table entry, the architecture entry points, and the build rules for the files that hold them. FORK_IS_TASK_FORK now depends on TASK_FORK rather than ARCH_HAVE_TASK_FORK. Aliasing fork() to a task_fork() that was not built would not link. vfork() and fork() are untouched; each is still selected on its own, and task_fork.c, lib_fork.c and the architecture's fork file are still built when any one of the three is present. Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| exit.c | ||
| Make.defs | ||
| spawn.h | ||
| task.h | ||
| task_activate.c | ||
| task_argvstr.c | ||
| task_cancelpt.c | ||
| task_create.c | ||
| task_delete.c | ||
| task_execve.c | ||
| task_exit.c | ||
| task_exithook.c | ||
| task_fork.c | ||
| task_getgroup.c | ||
| task_getpid.c | ||
| task_getppid.c | ||
| task_gettid.c | ||
| task_init.c | ||
| task_join.c | ||
| task_posixspawn.c | ||
| task_prctl.c | ||
| task_recover.c | ||
| task_reparent.c | ||
| task_restart.c | ||
| task_setup.c | ||
| task_spawn.c | ||
| task_spawnparms.c | ||
| task_start.c | ||
| task_terminate.c | ||