mirror of
https://github.com/apache/nuttx.git
synced 2026-08-09 22:45:08 +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>
18 KiB
18 KiB
| 1 | _assert | assert.h | void | FAR const char * | int | FAR const char * | FAR void * | |
|---|---|---|---|---|---|---|---|---|
| 2 | accept4 | sys/socket.h | defined(CONFIG_NET) | int | int | FAR struct sockaddr * | FAR socklen_t * | int |
| 3 | clock_nanosleep | time.h | int | clockid_t | int | FAR const struct timespec * | FAR struct timespec * | |
| 4 | epoll_ctl | sys/epoll.h | int | int | int | int | FAR struct epoll_event * | |
| 5 | epoll_wait | sys/epoll.h | int | int | FAR struct epoll_event * | int | int | |
| 6 | fcntl | fcntl.h | int | int | int | ... | uintptr_t | |
| 7 | ioctl | sys/ioctl.h | int | int | int | ... | unsigned long | |
| 8 | mq_receive | mqueue.h | !defined(CONFIG_DISABLE_MQUEUE) | ssize_t | mqd_t | FAR char * | size_t | FAR unsigned int * |
| 9 | mq_send | mqueue.h | !defined(CONFIG_DISABLE_MQUEUE) | int | mqd_t | FAR const char * | size_t | unsigned int |
| 10 | open | fcntl.h | int | FAR const char * | int | ... | mode_t | |
| 11 | ppoll | poll.h | !defined(CONFIG_DISABLE_ALL_SIGNALS) | int | FAR struct pollfd * | nfds_t | FAR const struct timespec * | FAR const sigset_t * |
| 12 | prctl | sys/prctl.h | int | int | ... | uintptr_t | uintptr_t | |
| 13 | pread | unistd.h | ssize_t | int | FAR void * | size_t | off_t | |
| 14 | pwrite | unistd.h | ssize_t | int | FAR const void * | size_t | off_t | |
| 15 | recv | sys/socket.h | defined(CONFIG_NET) | ssize_t | int | FAR void * | size_t | int |
| 16 | sched_backtrace | sched.h | defined(CONFIG_SCHED_BACKTRACE) | int | pid_t | FAR void ** | int | int |
| 17 | send | sys/socket.h | defined(CONFIG_NET) | ssize_t | int | FAR const void * | size_t | int |
| 18 | sendfile | sys/sendfile.h | ssize_t | int | int | FAR off_t * | size_t | |
| 19 | socketpair | sys/socket.h | defined(CONFIG_NET) | int | int | int | int | int [2]|FAR int * |
| 20 | timer_settime | time.h | !defined(CONFIG_DISABLE_POSIX_TIMERS) | int | timer_t | int | FAR const struct itimerspec * | FAR struct itimerspec * |
| 21 | timerfd_settime | sys/timerfd.h | defined(CONFIG_TIMER_FD) | int | int | int | FAR const struct itimerspec * | FAR struct itimerspec * |
| 22 | waitid | sys/wait.h | defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT) | int | idtype_t | id_t | FAR siginfo_t * | int |