nuttx/libs/libc/libc.csv
Marco Casaroli 70c2ef5911 !sched/arch/libc: Give fork() and vfork() their real, separate semantics.
NuttX implemented fork() and vfork() as the same function.  Both were libc
wrappers around a single up_fork() syscall; vfork() differed only by a
trailing waitpid().  Underneath, the child joined the parent's address
environment -- the same addrenv_join() that pthread_create() uses -- and got
a private copy of the stack.  So the child shared .data, .bss and the heap
with its parent and ran concurrently with it.

That is not fork().  It is vfork()-with-a-private-stack under fork()'s name,
and the history says so: today's fork() is NuttX's old vfork(), renamed in
c33d1c9c97 (2023) without any change of behaviour.  The failure was silent --
a program written against POSIX fork() compiled, ran, and had its child's
writes land in the parent's variables.

Separate them into two primitives, chosen by which function the caller
called rather than by what the hardware happens to be:

  fork()   child gets its own copy of the parent's memory at the same
           virtual addresses; runs concurrently.  Only where an address
           environment can be duplicated -- elsewhere it is not declared at
           all, so calling it is a build error naming the function.
  vfork()  child shares the parent's memory; parent suspended until the
           child _exit()s or exec()s.  Implementable everywhere.

Below libc there is still one syscall.  up_fork() gains a bool saying which
primitive the caller used, since the per-architecture register snapshot is
the same for both, and passes it to nxtask_setup_fork(), which is the single
place the memory semantics are decided.  The argument arrives in the first
argument register and is never touched:  each architecture's snapshot takes
some other call-clobbered register for its scratch, so the flag is simply
still there when the C worker is called.

The vfork() parent suspension moves out of libc into nxtask_start_fork(),
released from nxsched_release_tcb() by nxtask_resume_vfork().  Two things
follow: the parent is resumed at exec(), since exec_swap() has already handed
the child's pid to the loaded program by the time the vfork stub exits, and
vfork() no longer depends on CONFIG_SCHED_WAITPID.

Releasing there requires one fix in nxtask_exit().  It raises rtcb->lockcount
directly rather than through sched_lock() while it tears the TCB down, so the
nxsem_post() that wakes the vfork() parent leaves it queued where a blocked
task collects while pre-emption is off -- g_pendingtasks, or g_readytorun on
SMP -- and the matching raw lockcount-- does not publish it the way
sched_unlock() would, leaving the parent stranded with nothing to move it on.
The fix mirrors sched_unlock() for each case:  nxsched_merge_pending(), or
nxsched_deliver_task() under CONFIG_SMP.  Both are no-ops while pre-emption is
still disabled, and up_exit() re-reads this_task() afterwards, so a change of
the ready-to-run head is honoured.  Without it vfork() deadlocks wherever no
other task happens to call sched_unlock() afterwards -- rv-virt:nsh64 and
rv-virt:pnsh64, where NSH is blocked in waitpid() holding the lock, and
qemu-armv8a:citest_smp, which hangs the moment the vfork() test runs.

fork() is built on a new addrenv_fork(), backed by an up_addrenv_fork() hook
that duplicates an address environment into freshly allocated pages mapped at
the same virtual addresses -- unlike up_addrenv_clone(), which copies only
the representation and leaves both pointing at the same page tables.  The
child then adopts the parent's stack geometry rather than being given a
relocated copy: a pointer to a stack local taken before fork() must name the
same object in the child that it named in the parent, and the parent's stack
is already in the duplicate, with its contents, at the parent's address.

No architecture implements up_addrenv_fork() yet, so this commit leaves
fork() unavailable everywhere.  That is the intended state.  It withdraws
fork() from ARCH_ARM, flat ARCH_ARM64, ARCH_RISCV, ARCH_SIM and ARCH_X86_64,
where until now it named the sharing primitive; per-architecture patches
restore it, with POSIX semantics, as up_addrenv_fork() lands.  In the
meantime the sharing primitive is still there under the name that describes
it: vfork() for a child that runs a program, pthread_create() for a second
flow of control that shares memory, posix_spawn() for both at once.

Kconfig: ARCH_HAVE_VFORK inherits ARCH_HAVE_FORK's select lines, conditions
included, so no configuration gains machinery; ARCH_HAVE_FORK is redefined to
mean "can provide POSIX fork() semantics" and now depends on ARCH_ADDRENV.

There is one deliberate departure from "verbatim".  ARCH_ARM selected the
fork family unconditionally, BUILD_KERNEL included, and that has never
worked:  on a kernel build the architecture's fork entry point sees the
kernel's return address and stack pointer rather than the caller's, so the
child resumes at a kernel address.  On qemu-armv7a:knsh master faults in
ostest's fork case with "Child did not run" and then a data abort; without
the condition this change faults the same way through vfork().  ARCH_ARM64
and ARCH_X86_64 already carried "if !BUILD_KERNEL" for exactly this reason --
ARM was the outlier.  Conditioning it turns a runtime fault into an honest
absence, which is the whole point of the change; arch/arm takes the condition
off again in the patch that adds its saved-syscall-frame path.  Only the
MMU-capable ARM ports are affected, since Cortex-M cannot build BUILD_KERNEL
at all.

Also fixes two latent syntax errors found on the way: a missing comma in
riscv_fork.c and mips_fork.c, both in *_FRAMEPOINTER && !SAVE_GP branches
that are never compiled today.

BREAKING CHANGE: fork() is withdrawn from every architecture.  It is no
longer declared in unistd.h, so code that calls it fails to build with an error
naming the function, and the sharing behaviour it used to have is gone rather
than renamed.  CONFIG_ARCH_HAVE_FORK no longer means "fork() exists"; it means
"this configuration can provide POSIX fork() semantics", and no architecture
selects it yet.

Quick fix, chosen by why the call was made:

  to run a program                vfork() + exec*(), or better posix_spawn()
  a second flow of control that   pthread_create()
  shares the caller's memory
  a genuinely independent copy    keep fork(), and wait for the per-arch patch
  of the process                  that implements up_addrenv_fork() and selects
                                  CONFIG_ARCH_HAVE_FORK

Out-of-tree code that tests CONFIG_ARCH_HAVE_FORK to decide whether a
fork-then-exec path is available wants CONFIG_ARCH_HAVE_VFORK instead, which is
selected in exactly the places CONFIG_ARCH_HAVE_FORK used to be.  The full
migration guide is Documentation/guides/fork_vfork_migration.rst.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-08-10 08:57:30 -03:00

399 lines
30 KiB
CSV

"__assert","assert.h","","void","FAR const char *","int","FAR const char *"
"__cxa_atexit","stdlib.h","","int","FAR CODE void (*)(FAR void *)|FAR void *","FAR void *","FAR void *"
"__errno","errno.h","defined(CONFIG_BUILD_FLAT)","FAR int *"
"__stack_chk_fail","ssp/ssp.h","defined(CONFIG_STACK_CANARIES)","void","void"
"_alert","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR)","void","FAR const char *","..."
"_err","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR)","void","FAR const char *","..."
"_exit","unistd.h","","void","int"
"_info","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO)","void","FAR const char *","..."
"_warn","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN)","void","FAR const char *","..."
"abort","stdlib.h","","void"
"abs","stdlib.h","","int","int"
"aio_error","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *"
"aio_return","aio.h","defined(CONFIG_FS_AIO)","ssize_t","FAR struct aiocb *"
"aio_suspend","aio.h","defined(CONFIG_FS_AIO)","int","FAR const struct aiocb * const []|FAR const struct aiocb * const *","int","FAR const struct timespec *"
"alarm","unistd.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","unsigned int","unsigned int"
"alphasort","dirent.h","","int","FAR const struct dirent **","FAR const struct dirent **"
"arc4random","stdlib.h","","uint32_t"
"arc4random_buf","stdlib.h","","void","FAR void *","size_t"
"asprintf","stdio.h","","int","FAR char **","FAR const IPTR char *","..."
"atof","stdlib.h","defined(CONFIG_HAVE_DOUBLE)","double","FAR const char *"
"atoi","stdlib.h","","int","FAR const char *"
"atol","stdlib.h","","long","FAR const char *"
"atoll","stdlib.h","","long long","FAR const char *"
"b16cos","fixedmath.h","","b16_t","b16_t"
"b16sin","fixedmath.h","","b16_t","b16_t"
"basename","libgen.h","","FAR char *","FAR char *"
"bind_textdomain_codeset","libintl.h","defined(CONFIG_LIBC_LOCALE_GETTEXT)","FAR char *","FAR const char *","FAR const char *"
"bindtextdomain","libintl.h","defined(CONFIG_LIBC_LOCALE_GETTEXT)","FAR char *","FAR const char *","FAR const char *"
"bsearch","stdlib.h","","FAR void *","FAR const void *","FAR const void *","size_t","size_t","FAR void *"
"btowc","wchar.h","","wint_t","int"
"calloc","stdlib.h","","FAR void *","size_t","size_t"
"cfgetspeed","termios.h","","speed_t","FAR const struct termios *"
"cfsetspeed","termios.h","","int","FAR struct termios *","speed_t"
"chdir","unistd.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
"clock_getcpuclockid","time.h","","int","pid_t","FAR clockid_t *"
"clock_getres","time.h","","int","clockid_t","FAR struct timespec *"
"closedir","dirent.h","","int","DIR *"
"crc32","nuttx/crc32.h","","uint32_t","FAR const uint8_t *","size_t"
"crc32part","nuttx/crc32.h","","uint32_t","FAR const uint8_t *","size_t","uint32_t"
"ctime","time.h","","char *","const time_t *"
"crypt","unistd.h","defined(CONFIG_CRYPTO)","FAR const char *","FAR const char *"
"crypt_r","unistd.h","defined(CONFIG_CRYPTO)","FAR const char *","FAR const char *","FAR char *"
"daemon","unistd.h","","int","int","int"
"dgettext","libintl.h","defined(CONFIG_LIBC_LOCALE_GETTEXT)","FAR char *","FAR const char *","FAR const char *"
"dirname","libgen.h","","FAR char *","FAR char *"
"dlclose","dlfcn.h","defined(CONFIG_LIBC_DLFCN)","int","FAR void *"
"dlerror","dlfcn.h","defined(CONFIG_LIBC_DLFCN)","FAR char *"
"dlopen","dlfcn.h","defined(CONFIG_LIBC_DLFCN)","FAR void *","FAR const char *","int"
"dlsym","dlfcn.h","defined(CONFIG_LIBC_DLFCN)","FAR void *","FAR void *","FAR const char *"
"dlsymtab","dlfcn.h","defined(CONFIG_LIBC_DLFCN)","int","FAR const struct symtab_s *","int"
"dq_addafter","nuttx/queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *"
"dq_remfirst","nuttx/queue.h","","FAR dq_entry_t *","FAR dq_queue_t *"
"dq_remlast","nuttx/queue.h","","FAR dq_entry_t *","FAR dq_queue_t *"
"ether_ntoa","netinet/ether.h","","FAR char *","FAR const struct ether_addr *"
"execv","unistd.h","defined(CONFIG_LIBC_EXECFUNCS)","int","FAR const char *","FAR char *const[]|FAR char *const *"
"exit","stdlib.h","","noreturn","int"
"fchdir","unistd.h","!defined(CONFIG_DISABLE_ENVIRON)","int","int"
"fclose","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *"
"fdopen","stdio.h","defined(CONFIG_FILE_STREAM)","FAR FILE *","int","FAR const char *"
"feof","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *"
"ferror","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *"
"fflush","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *"
"ffs","strings.h","","int","int"
"fgetc","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *"
"fgetpos","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *","FAR fpos_t *"
"fgets","stdio.h","defined(CONFIG_FILE_STREAM)","FAR char *","FAR char *","int","FAR FILE *"
"fgetwc","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","FAR FILE *"
"fgetwc_unlocked","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","FAR FILE *"
"fileno","stdio.h","","int","FAR FILE *"
"flockfile","stdio.h","!defined(CONFIG_FILE_STREAM)","void","FAR FILE *"
"fnmatch","fnmatch.h","","int","FAR const char *","FAR const char *","int"
"fopen","stdio.h","defined(CONFIG_FILE_STREAM)","FAR FILE *","FAR const char *","FAR const char *"
"fork","unistd.h","!defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_ARCH_HAVE_FORK)","pid_t"
"fprintf","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *","FAR const IPTR char *","..."
"fputc","stdio.h","defined(CONFIG_FILE_STREAM)","int","int","FAR FILE *"
"fputs","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR const IPTR char *","FAR FILE *"
"fputwc","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","wchar_t","FAR FILE *"
"fputwc_unlocked","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","wchar_t","FAR FILE *"
"fputws","wchar.h","defined(CONFIG_FILE_STREAM)","int","FAR const wchar_t *","FAR FILE *"
"fputws_unlocked","wchar.h","defined(CONFIG_FILE_STREAM)","int","FAR const wchar_t *","FAR FILE *"
"fread","stdio.h","defined(CONFIG_FILE_STREAM)","size_t","FAR void *","size_t","size_t","FAR FILE *"
"free","stdlib.h","","void","FAR void *"
"freeaddrinfo","netdb.h","defined(CONFIG_LIBC_NETDB)","void","FAR struct addrinfo *"
"fscanf","stdio.h","","int","FAR FILE *","FAR const char *","..."
"fseek","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *","long int","int"
"fsetpos","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *","FAR fpos_t *"
"fstatvfs","sys/statvfs.h","","int","int","FAR struct statvfs *"
"ftell","stdio.h","defined(CONFIG_FILE_STREAM)","long","FAR FILE *"
"ftrylockfile","stdio.h","!defined(CONFIG_FILE_STREAM)","int","FAR FILE *"
"funlockfile","stdio.h","!defined(CONFIG_FILE_STREAM)","void","FAR FILE *"
"fwrite","stdio.h","defined(CONFIG_FILE_STREAM)","size_t","FAR const void *","size_t","size_t","FAR FILE *"
"gai_strerror","netdb.h","defined(CONFIG_LIBC_NETDB)","FAR const char *","int"
"getaddrinfo","netdb.h","defined(CONFIG_LIBC_NETDB)","int","FAR const char *","FAR const char *","FAR const struct addrinfo *","FAR struct addrinfo **"
"getc","stdio.h","","int","FAR FILE *"
"getcwd","unistd.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char *","FAR char *","size_t"
"get_current_dir_name","unistd.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char *","void"
"getegid","unistd.h","","gid_t"
"geteuid","unistd.h","","uid_t"
"gethostbyname","netdb.h","defined(CONFIG_LIBC_NETDB)","FAR struct hostent *","FAR const char *"
"gethostbyname2","netdb.h","defined(CONFIG_LIBC_NETDB)","FAR struct hostent *","FAR const char *","int"
"gethostname","unistd.h","","int","FAR char *","size_t"
"getnameinfo","netdb.h","defined(CONFIG_LIBC_NETDB)","int","FAR const struct sockaddr *","socklen_t","FAR char *","socklen_t","FAR char *","socklen_t","int"
"getopt","unistd.h","","int","int","FAR char * const []|FAR char * const *","FAR const char *"
"getoptargp","unistd.h","","FAR char **"
"getopterrp","unistd.h","","FAR int *"
"getoptindp","unistd.h","","FAR int *"
"getoptoptp","unistd.h","","FAR int *"
"getpriority","sys/resource.h","","int","int","id_t"
"getpass","unistd.h","","FAR const char *","FAR char *"
"getpwnam_r","pwd.h","","int","FAR const char *","FAR struct passwd *","FAR char *","size_t","FAR struct passwd **"
"getpwuid_r","pwd.h","","int","uid_t","FAR struct passwd *","FAR char *","size_t","FAR struct passwd **"
"getrandom","sys/random.h","!defined(CONFIG_BUILD_KERNEL)","ssize_t","FAR void *","size_t","unsigned int"
"gets","stdio.h","defined(CONFIG_FILE_STREAM)","FAR char *","FAR char *"
"gettext","libintl.h","defined(CONFIG_LIBC_LOCALE_GETTEXT)","FAR char *","FAR const char *"
"gettimeofday","sys/time.h","","int","FAR struct timeval *","FAR struct timezone *"
"getwc","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","FAR FILE *"
"gmtime","time.h","","FAR struct tm *","FAR const time_t *"
"gmtime_r","time.h","","FAR struct tm *","FAR const time_t *","FAR struct tm *"
"htonl","arpa/inet.h","","uint32_t","uint32_t"
"htonq","arpa/inet.h","","uint64_t","uint64_t"
"htons","arpa/inet.h","","uint16_t","uint16_t"
"iconv","iconv.h","defined(CONFIG_LIBC_LOCALE)","size_t","iconv_t","FAR char **","FAR size_t *","FAR char **","FAR size_t *"
"iconv_close","iconv.h","defined(CONFIG_LIBC_LOCALE)","int","iconv_t"
"iconv_open","iconv.h","defined(CONFIG_LIBC_LOCALE)","iconv_t","FAR const char *","FAR const char *"
"imaxabs","inttypes.h","","intmax_t","intmax_t"
"inet_addr","arpa/inet.h","","in_addr_t","FAR const char *"
"inet_ntoa","arpa/inet.h","defined(CONFIG_NET_IPv4)","FAR char *","struct in_addr"
"inet_ntop","arpa/inet.h","","FAR const char","int","FAR const void *","FAR char *","socklen_t"
"inet_pton","arpa/inet.h","","int","int","FAR const char *","FAR void *"
"isalnum","ctype.h","","int","int"
"isalpha","ctype.h","","int","int"
"isascii","ctype.h","","int","int"
"isatty","unistd.h","","int","int"
"isblank","ctype.h","","int","int"
"iscntrl","ctype.h","","int","int"
"isdigit","ctype.h","","int","int"
"isgraph","ctype.h","","int","int"
"islower","ctype.h","","int","int"
"isprint","ctype.h","","int","int"
"ispunct","ctype.h","","int","int"
"isspace","ctype.h","","int","int"
"isupper","ctype.h","","int","int"
"iswalnum","wctype.h","","int","wint_t"
"iswalpha","wctype.h","","int","wint_t"
"iswblank","wctype.h","","int","wint_t"
"iswcntrl","wctype.h","","int","wint_t"
"iswctype","wctype.h","","int","wint_t","wctype_t"
"iswdigit","wctype.h","","int","wint_t"
"iswgraph","wctype.h","","int","wint_t"
"iswlower","wctype.h","","int","wint_t"
"iswprint","wctype.h","","int","wint_t"
"iswpunct","wctype.h","","int","wint_t"
"iswspace","wctype.h","","int","wint_t"
"iswupper","wctype.h","","int","wint_t"
"iswxdigit","wctype.h","","int","wint_t"
"isxdigit","ctype.h","","int","int"
"labs","stdlib.h","","long int","long int"
"lib_dumpbuffer","debug.h","","void","FAR const char *","FAR const uint8_t *","unsigned int"
"lib_get_stream","nuttx/tls.h","","FAR struct file_struct *","int"
"lio_listio","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb * const []|FAR struct aiocb * const *","int","FAR struct sigevent *"
"llabs","stdlib.h","","long long int","long long int"
"localtime","time.h","","struct tm *","const time_t *"
"localtime_r","time.h","","FAR struct tm *","FAR const time_t *","FAR struct tm *"
"mallinfo","malloc.h","","struct mallinfo","void"
"malloc","stdlib.h","","FAR void *","size_t"
"malloc_size","malloc.h","","size_t","FAR void *"
"mblen","stdlib.h","","int","FAR const char *","size_t"
"mbrlen","wchar.h","","size_t","FAR const char *","size_t","FAR mbstate_t *"
"mbrtowc","wchar.h","","size_t","FAR wchar_t *","FAR const char *","size_t","FAR mbstate_t *"
"mbsnrtowcs","wchar.h","","size_t","FAR wchar_t *","FAR const char **","size_t","size_t","FAR mbstate_t *"
"mbsrtowcs","wchar.h","","size_t","FAR wchar_t *","FAR const char **","size_t","FAR mbstate_t *"
"mbstowcs","stdlib.h","","size_t","FAR wchar_t *","FAR const char *","size_t"
"mbtowc","stdlib.h","","int","FAR wchar_t *","FAR const char *","size_t"
"memccpy","string.h","","FAR void *","FAR void *","FAR const void *","int","size_t"
"memchr","string.h","","FAR void *","FAR const void *","int","size_t"
"memcmp","string.h","","int","FAR const void *","FAR const void *","size_t"
"memcpy","string.h","","FAR void *","FAR void *","FAR const void *","size_t"
"memmove","string.h","","FAR void *","FAR void *","FAR const void *","size_t"
"memset","string.h","","FAR void *","FAR void *","int","size_t"
"mkdtemp","stdlib.h","","FAR char *","FAR char *"
"mkfifo","sys/stat.h","defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0","int","FAR const char *","mode_t"
"mkstemp","stdlib.h","","int","FAR char *"
"mktemp","stdlib.h","","FAR char *","FAR char *"
"mktime","time.h","","time_t","FAR struct tm *"
"nice","unistd.h","","int","int"
"ntohl","arpa/inet.h","","uint32_t","uint32_t"
"ntohq","arpa/inet.h","","uint64_t","uint64_t"
"ntohs","arpa/inet.h","","uint16_t","uint16_t"
"opendir","dirent.h","","FAR DIR *","FAR const char *"
"perror","stdio.h","defined(CONFIG_FILE_STREAM)","void","FAR const char *"
"pipe","unistd.h","defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0","int","int [2]|FAR int *"
"posix_fallocate","fcntl.h","","int","int","off_t","off_t"
"posix_memalign","stdlib.h","","int","FAR void **","size_t","size_t"
"preadv","sys/uio.h","","ssize_t","int","FAR const struct iovec *","int","off_t"
"printf","stdio.h","","int","FAR const IPTR char *","..."
"pthread_attr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
"pthread_attr_getinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR int *"
"pthread_attr_getschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR struct sched_param *"
"pthread_attr_getschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR int *"
"pthread_attr_getstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR size_t *"
"pthread_attr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
"pthread_attr_setinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
"pthread_attr_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR const struct sched_param *"
"pthread_attr_setschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
"pthread_attr_setstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","size_t"
"pthread_barrier_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrier_t *"
"pthread_barrier_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrier_t *","FAR const pthread_barrierattr_t *","unsigned int"
"pthread_barrier_wait","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrier_t *"
"pthread_barrierattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
"pthread_barrierattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_barrierattr_t *","FAR int *"
"pthread_barrierattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
"pthread_barrierattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *","int"
"pthread_cond_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t *"
"pthread_cond_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t *","FAR const pthread_condattr_t *"
"pthread_cond_timedwait","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t *","FAR pthread_mutex_t *","FAR const struct timespec *"
"pthread_condattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
"pthread_condattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
"pthread_condattr_setclock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *","clockid_t"
"pthread_create","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_t *","FAR const pthread_attr_t *","pthread_startroutine_t","pthread_addr_t"
"pthread_getname_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","char *","size_t"
"pthread_getspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","FAR void *","pthread_key_t"
"pthread_gettid_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","pid_t","pthread_t"
"pthread_key_create","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","int","FAR pthread_key_t *","FAR void (*) (void *)|FAR void *"
"pthread_key_delete","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","int","pthread_key_t"
"pthread_mutex_getprioceiling","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_PRIORITY_PROTECT)","int","FAR const pthread_mutex_t *","FAR int *"
"pthread_mutex_lock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t *"
"pthread_mutex_setprioceiling","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_PRIORITY_PROTECT)","int","FAR pthread_mutex_t *","int","FAR int *"
"pthread_mutexattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
"pthread_mutexattr_getprioceiling","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_PRIORITY_PROTECT)","int","FAR pthread_mutexattr_t *","FAR int *"
"pthread_mutexattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","FAR int *"
"pthread_mutexattr_gettype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_PTHREAD_MUTEX_TYPES)","int","FAR const pthread_mutexattr_t *","FAR int *"
"pthread_mutexattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
"pthread_mutexattr_setprioceiling","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_PRIORITY_PROTECT)","int","FAR pthread_mutexattr_t *","int"
"pthread_mutexattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","int "
"pthread_mutexattr_settype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_PTHREAD_MUTEX_TYPES)","int","FAR pthread_mutexattr_t *","int"
"pthread_once","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_once_t*","CODE void (*)(void)"
"pthread_rwlock_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_rwlock_t *"
"pthread_rwlock_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_rwlock_t *restrict","FAR const pthread_rwlockattr_t *"
"pthread_rwlock_rdlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_rwlock_t *"
"pthread_rwlock_unlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_rwlock_t *"
"pthread_self","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","pthread_t","void"
"pthread_setname_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","const char *"
"pthread_setspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","int","pthread_key_t","FAR const void *"
"pthread_yield","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","void"
"puts","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR const IPTR char *"
"putwc","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","wchar_t","FAR FILE *"
"putwc_unlocked","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","wchar_t","FAR FILE *"
"putwchar","wchar.h","","wint_t","wchar_t"
"pwritev","sys/uio.h","","ssize_t","int","FAR const struct iovec *","int","off_t"
"qsort","stdlib.h","","void","FAR void *","size_t","size_t","int(*)(FAR const void *,FAR const void *)"
"raise","signal.h","","int","int"
"rand","stdlib.h","","int"
"readdir","dirent.h","","FAR struct dirent *","FAR DIR *"
"readdir_r","dirent.h","","int","FAR DIR *","FAR struct dirent *","FAR struct dirent **"
"readv","sys/uio.h","","ssize_t","int","FAR const struct iovec *","int"
"realloc","stdlib.h","","FAR void *","FAR void *","size_t"
"remove","stdio.h","","int","const char *"
"rewind","stdio.h","defined(CONFIG_FILE_STREAM)","void","FAR FILE *"
"scandir","dirent.h","","int","FAR const char *","FAR struct dirent ***","FAR int (*)(const struct dirent *)|FAR void *","FAR void *"
"sched_get_priority_max","sched.h","","int","int"
"sched_get_priority_min","sched.h","","int","int"
"sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *"
"sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int"
"setlocale","locale.h","defined(CONFIG_LIBC_LOCALE)","FAR char *","int","FAR const char *"
"setlogmask","syslog.h","","int","int"
"setpriority","sys/resource.h","","int","int","id_t","int"
"shutdown","sys/socket.h","defined(CONFIG_NET)","int","int","int"
"sigaddset","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR sigset_t *","int"
"sigdelset","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR sigset_t *","int"
"sigemptyset","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR sigset_t *"
"sigfillset","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR sigset_t *"
"sigismember","signal.h","!defined(CONFIG_DISABLE_ALL_SIGNALS)","int","FAR const sigset_t *","int"
"signal","signal.h","defined(CONFIG_ENABLE_ALL_SIGNALS)","_sa_handler_t","int","_sa_handler_t"
"sleep","unistd.h","","unsigned int","unsigned int"
"snprintf","stdio.h","","int","FAR char *","size_t","FAR const IPTR char *","..."
"sprintf","stdio.h","","int","FAR char *","FAR const IPTR char *","..."
"sprintf","stdio.h","","int","FAR char *","FAR const IPTR char *","..."
"sq_addafter","nuttx/queue.h","","void","FAR sq_entry_t *","FAR sq_entry_t *","FAR sq_queue_t *"
"sq_remafter","nuttx/queue.h","","FAR sq_entry_t","FAR sq_entry_t *","FAR sq_queue_t *"
"sq_remfirst","nuttx/queue.h","","FAR sq_entry_t *","FAR sq_queue_t *"
"sq_remlast","nuttx/queue.h","","FAR sq_entry_t *","FAR sq_queue_t *"
"srand","stdlib.h","","void","unsigned int"
"sscanf","stdio.h","","int","FAR const IPTR char *","FAR const char *","..."
"sscanf","stdio.h","","int","FAR const char *","FAR const char *","..."
"statvfs","sys/statvfs.h","","int","FAR const char *","FAR struct statvfs *"
"stpcpy","string.h","","FAR char *","FAR char *","FAR const char *"
"strcasecmp","strings.h","","int","FAR const char *","FAR const char *"
"strcasestr","string.h","","FAR char *","FAR const char *","FAR const char *"
"strcat","string.h","","FAR char *","FAR char *","FAR const char *"
"strchr","string.h","","FAR char *","FAR const char *","int"
"strchrnul","string.h","","FAR char *","FAR const char *","int"
"strcmp","string.h","","int","FAR const char *","FAR const char *"
"strcoll","string.h","defined(CONFIG_LIBC_LOCALE)","int","FAR const char *","FAR const char *"
"strcpy","string.h","","FAR char *","FAR char *","FAR const char *"
"strcspn","string.h","","size_t","FAR const char *","FAR const char *"
"strdup","string.h","","FAR char *","FAR const char *"
"strerror","string.h","","FAR char *","int"
"strerror_r","string.h","","int","int","FAR char *","size_t"
"strftime","time.h","","size_t","FAR char *","size_t","FAR const char *","FAR const struct tm *"
"strlcpy","string.h","","size_t","FAR char *","FAR const char *","size_t"
"strlen","string.h","","size_t","FAR const char *"
"strncasecmp","strings.h","","int","FAR const char *","FAR const char *","size_t"
"strncat","string.h","","FAR char *","FAR char *","FAR const char *","size_t"
"strncmp","string.h","","int","FAR const char *","FAR const char *","size_t"
"strncpy","string.h","","FAR char *","FAR char *","FAR const char *","size_t"
"strndup","string.h","","FAR char *","FAR const char *","size_t"
"strnlen","string.h","","size_t","FAR const char *","size_t"
"strpbrk","string.h","","FAR char *","FAR const char *","FAR const char *"
"strrchr","string.h","","FAR char *","FAR const char *","int"
"strsep","string.h","","FAR char *","FAR char **","FAR const char *"
"strspn","string.h","","size_t","FAR const char *","FAR const char *"
"strstr","string.h","","FAR char *","FAR const char *","FAR const char *"
"strtod","stdlib.h","","double","FAR const char *","FAR char **"
"strtod","stdlib.h","defined(CONFIG_HAVE_DOUBLE)","double","FAR const char *","FAR char **"
"strtoimax","inttypes.h","","intmax_t","FAR const char *","FAR char **","int"
"strtok","string.h","","FAR char *","FAR char *","FAR const char *"
"strtok_r","string.h","","FAR char *","FAR char *","FAR const char *","FAR char **"
"strtol","stdlib.h","","long","FAR const char *","FAR char **","int"
"strtoll","stdlib.h","","long long","FAR const char *","FAR char **","int"
"strtoul","stdlib.h","","unsigned long","FAR const char *","FAR char **","int"
"strtoull","stdlib.h","","unsigned long long int","FAR const char *","FAR char **","int"
"strtoull","stdlib.h","","unsigned long long","FAR const char *","FAR char **","int"
"strtoumax","inttypes.h","","uintmax_t","FAR const char *","FAR char **","int"
"strxfrm","string.h","defined(CONFIG_LIBC_LOCALE)","size_t","FAR char *","FAR const char *","size_t"
"swab","unistd.h","","void","FAR const void *","FAR void *","ssize_t"
"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_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"
"task_tls_set_value","nuttx/tls.h","CONFIG_TLS_TASK_NELEM > 0","int","int","uintptr_t"
"tcflush","termios.h","","int","int","int"
"tcgetattr","termios.h","","int","int","FAR struct termios *"
"tcsetattr","termios.h","","int","int","int","FAR const struct termios *"
"telldir","dirent.h","","off_t","FAR DIR *"
"textdomain","libintl.h","defined(CONFIG_LIBC_LOCALE_GETTEXT)","FAR char *","FAR const char *"
"time","time.h","","time_t","FAR time_t *"
"tolower","ctype.h","","int","int"
"toupper","ctype.h","","int","int"
"towlower","wchar.h","","wint_t","wint_t"
"towupper","wchar.h","","wint_t","wint_t"
"truncate","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *","off_t"
"uname","sys/utsname.h","","int","FAR struct utsname *"
"ungetc","stdio.h","defined(CONFIG_FILE_STREAM)","int","int","FAR FILE *"
"ungetwc","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","wint_t","FAR FILE *"
"ungetwc_unlocked","wchar.h","defined(CONFIG_FILE_STREAM)","wint_t","wint_t","FAR FILE *"
"usleep","unistd.h","","int","useconds_t"
"vasprintf","stdio.h","","int","FAR char **","FAR const IPTR char *","va_list"
"versionsort","dirent.h","","int","FAR const struct dirent **","FAR const struct dirent **"
"vfork","unistd.h","!defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_ARCH_HAVE_VFORK)","pid_t"
"vfprintf","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *","FAR const IPTR char *","va_list"
"vprintf","stdio.h","","int","FAR const IPTR char *","va_list"
"vscanf","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR const IPTR char *","va_list"
"vsnprintf","stdio.h","","int","FAR char *","size_t","FAR const IPTR char *","va_list"
"vsprintf","stdio.h","","int","FAR char *","FAR const IPTR char *","va_list"
"vsscanf","stdio.h","","int","FAR const char *","FAR const IPTR char *","va_list"
"vsyslog","syslog.h","","void","int","FAR const IPTR char *","va_list"
"wcrtomb","wchar.h","","size_t","FAR char *","wchar_t","FAR mbstate_t *"
"wcscat","wchar.h","","FAR wchar_t *","FAR wchar_t *","FAR const wchar_t *"
"wcschr","wchar.h","","FAR wchar_t *","FAR const wchar_t *","wchar_t"
"wcscmp","wchar.h","","int","FAR const wchar_t *","FAR const wchar_t *"
"wcscoll","wchar.h","","int","FAR const wchar_t *","FAR const wchar_t *"
"wcscpy","wchar.h","","FAR wchar_t *","FAR wchar_t *","FAR const wchar_t *"
"wcscspn","wchar.h","","size_t","FAR const wchar_t *","FAR const wchar_t *"
"wcsftime","wchar.h","","size_t","FAR wchar_t *","size_t","FAR const wchar_t *","FAR const struct tm *"
"wcslcat","wchar.h","","size_t","FAR wchar_t *","FAR const wchar_t *","size_t"
"wcsncat","wchar.h","","FAR wchar_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wcsncmp","wchar.h","","int","FAR const wchar_t *","FAR const wchar_t *","size_t"
"wcsncpy","wchar.h","","FAR wchar_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wcslcpy","wchar.h","","size_t","FAR wchar_t *","FAR const wchar_t *","size_t"
"wcslen","wchar.h","","size_t","FAR const wchar_t *"
"wcsnrtombs","wchar.h","","size_t","FAR char *","FAR const wchar_t **","size_t","size_t","FAR mbstate_t *"
"wcspbrk","wchar.h","","FAR wchar_t *","FAR const wchar_t *","FAR const wchar_t *"
"wcsrchr","wchar.h","","FAR wchar_t *","FAR const wchar_t *","wchar_t"
"wcsspn","wchar.h","","size_t","FAR const wchar_t *","FAR const wchar_t *"
"wcsstr","wchar.h","","FAR wchar_t *","FAR const wchar_t *","FAR const wchar_t *"
"wcsrtombs","wchar.h","","size_t","FAR char *","FAR const wchar_t **","size_t","FAR mbstate_t *"
"wcstod","wchar.h","","double","FAR const wchar_t *","FAR wchar_t **"
"wcstof","wchar.h","","float","FAR const wchar_t *","FAR wchar_t **"
"wcstok","wchar.h","","FAR wchar_t *","FAR wchar_t *","FAR const wchar_t *","FAR wchar_t **"
"wcstol","wchar.h","","long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcstold","wchar.h","","long double","FAR const wchar_t *","FAR wchar_t **"
"wcstoll","wchar.h","","long long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcstombs","stdlib.h","","size_t","FAR char *","FAR const wchar_t *","size_t"
"wcstoul","wchar.h","","unsigned long int","FAR const wchar_t *","FAR wchar_t **","int"
"wcswcs","wchar.h","","FAR wchar_t *","FAR const wchar_t *","FAR const wchar_t *"
"wcswidth","wchar.h","","int","FAR const wchar_t *","size_t"
"wcsxfrm","wchar.h","","size_t","FAR wchar_t *","FAR const wchar_t *","size_t"
"wctob","wchar.h","","int","wint_t"
"wctomb","stdlib.h","","int","FAR char *","wchar_t"
"wctype","wctype.h","","wctype_t","FAR const char *"
"wcwidth","wchar.h","","int","wchar_t"
"wmemchr","wchar.h","","FAR wchar_t *","FAR const wchar_t *","wchar_t","size_t"
"wmemcmp","wchar.h","","int","FAR const wchar_t *","FAR const wchar_t *","size_t"
"wmemcpy","wchar.h","","FAR wchat_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wmemmove","wchar.h","","FAR wchat_t *","FAR wchar_t *","FAR const wchar_t *","size_t"
"wmemset","wchar.h","","FAR wchat_t *","FAR wchar_t *","wchar_t","size_t"
"writev","sys/uio.h","","ssize_t","int","FAR const struct iovec *","int"