nuttx/include/sys/syscall_lookup.h

426 lines
14 KiB
C
Raw Normal View History

/****************************************************************************
* include/sys/syscall_lookup.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/* SYSCALL_LOOKUP must be defined before including this file.
*
* These first system calls are supported regardless of the NuttX
* configuration
*/
SYSCALL_LOOKUP1(_exit, 1)
SYSCALL_LOOKUP(_assert, 4)
SYSCALL_LOOKUP(prctl, 2)
#ifdef CONFIG_SCHED_HAVE_PARENT
SYSCALL_LOOKUP(getppid, 0)
#endif
SYSCALL_LOOKUP(sched_getcpu, 0)
SYSCALL_LOOKUP(sched_getparam, 2)
SYSCALL_LOOKUP(sched_getscheduler, 1)
SYSCALL_LOOKUP(sched_lock, 0)
SYSCALL_LOOKUP(sched_lockcount, 0)
SYSCALL_LOOKUP(sched_rr_get_interval, 2)
SYSCALL_LOOKUP(sched_setparam, 2)
SYSCALL_LOOKUP(sched_setscheduler, 3)
SYSCALL_LOOKUP(sched_unlock, 0)
SYSCALL_LOOKUP(sched_yield, 0)
SYSCALL_LOOKUP(nxsched_get_stackinfo, 2)
#ifdef CONFIG_SCHED_BACKTRACE
SYSCALL_LOOKUP(sched_backtrace, 4)
#endif
#ifdef CONFIG_SMP
SYSCALL_LOOKUP(sched_getaffinity, 3)
SYSCALL_LOOKUP(sched_setaffinity, 3)
#endif
SYSCALL_LOOKUP(sysinfo, 1)
SYSCALL_LOOKUP(gethostname, 2)
SYSCALL_LOOKUP(sethostname, 2)
/* User identity */
#ifdef CONFIG_SCHED_USER_IDENTITY
SYSCALL_LOOKUP(setuid, 1)
SYSCALL_LOOKUP(getuid, 0)
SYSCALL_LOOKUP(setgid, 1)
SYSCALL_LOOKUP(getgid, 0)
SYSCALL_LOOKUP(seteuid, 1)
SYSCALL_LOOKUP(geteuid, 0)
SYSCALL_LOOKUP(setegid, 1)
SYSCALL_LOOKUP(getegid, 0)
# if CONFIG_SCHED_NGROUPS > 0
SYSCALL_LOOKUP(setgroups, 2)
SYSCALL_LOOKUP(getgroups, 2)
# endif
SYSCALL_LOOKUP(setreuid, 2)
SYSCALL_LOOKUP(setregid, 2)
SYSCALL_LOOKUP(setresuid, 3)
SYSCALL_LOOKUP(setresgid, 3)
SYSCALL_LOOKUP(getresuid, 3)
SYSCALL_LOOKUP(getresgid, 3)
#endif
/* Semaphores */
SYSCALL_LOOKUP(nxsem_destroy, 1)
SYSCALL_LOOKUP(nxsem_post_slow, 1)
SYSCALL_LOOKUP(nxsem_reset, 2)
SYSCALL_LOOKUP(nxsem_tickwait, 2)
SYSCALL_LOOKUP(nxsem_clockwait, 3)
SYSCALL_LOOKUP(nxsem_timedwait, 2)
SYSCALL_LOOKUP(nxsem_trywait_slow, 1)
SYSCALL_LOOKUP(nxsem_wait_slow, 1)
Fix Deadloop in VFS if CONFIG_CANCELLATION_POINTS is enabled If cancellation points are enabled, then the following logic is activated in sem_wait(). This causes ECANCELED to be returned every time that sem_wait is called. int sem_wait(FAR sem_t *sem) { ... /* sem_wait() is a cancellation point */ if (enter_cancellation_point()) { #ifdef CONFIG_CANCELLATION_POINTS /* If there is a pending cancellation, then do not perform * the wait. Exit now with ECANCELED. */ errcode = ECANCELED; goto errout_with_cancelpt; #endif } ... Normally this works fine. sem_wait() is the OS API called by the application and will cancel the thread just before it returns to the application. Since it is cancellation point, it should never be called from within the OS. There there is is one perverse cases where sem_wait() may be nested within another cancellation point. If open() is called, it will attempt to lock a VFS data structure and will eventually call nxmutex_lock(). nxmutex_lock() waits on a semaphore: int nxmutex_lock(FAR mutex_t *mutex) { ... for (; ; ) { /* Take the semaphore (perhaps waiting) */ ret = _SEM_WAIT(&mutex->sem); if (ret >= 0) { mutex->holder = _SCHED_GETTID(); break; } ret = _SEM_ERRVAL(ret); if (ret != -EINTR && ret != -ECANCELED) { break; } } ... } In the FLAT build, _SEM_WAIT expands to sem_wait(). That causes the error in the logic: It should always expand to nxsem_wait(). That is because sem_wait() is cancellation point and should never be called from with the OS or the C library internally. The failure occurs because the cancellation point logic in sem_wait() returns -ECANCELED (via _SEM_ERRVAL) because sem_wait() is nested; it needs to return the -ECANCELED error to the outermost cancellation point which is open() in this case. Returning -ECANCELED then causes an infinite loop to occur in nxmutex_lock(). The correct behavior in this case is to call nxsem_wait() instead of sem_wait(). nxsem_wait() is identical to sem_wait() except that it is not a cancelation point. It will return -ECANCELED if the thread is canceled, but only once. So no infinite loop results. In addition, an nxsem_wait() system call was added to support the call from nxmutex_lock(). This resolves Issue #9695
2023-07-06 08:15:18 -06:00
#ifdef CONFIG_PRIORITY_INHERITANCE
SYSCALL_LOOKUP(nxsem_set_protocol, 2)
#endif
#ifdef CONFIG_PRIORITY_PROTECT
SYSCALL_LOOKUP(nxsem_setprioceiling, 3)
SYSCALL_LOOKUP(nxsem_getprioceiling, 2)
#endif
/* Named semaphores */
#ifdef CONFIG_FS_NAMED_SEMAPHORES
SYSCALL_LOOKUP(nxsem_open, 5)
SYSCALL_LOOKUP(nxsem_close, 1)
SYSCALL_LOOKUP(nxsem_unlink, 1)
#endif
#ifndef CONFIG_BUILD_KERNEL
SYSCALL_LOOKUP(task_create, 5)
SYSCALL_LOOKUP(task_spawn, 6)
SYSCALL_LOOKUP(task_delete, 1)
SYSCALL_LOOKUP(task_restart, 1)
#else
SYSCALL_LOOKUP(pgalloc, 2)
#endif
/* The following can be individually enabled */
!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-07 12:12:59 +02:00
#if defined(CONFIG_ARCH_HAVE_VFORK) || defined(CONFIG_ARCH_HAVE_FORK)
SYSCALL_LOOKUP(up_fork, 1)
#endif
#ifdef CONFIG_SCHED_WAITPID
SYSCALL_LOOKUP(waitpid, 3)
#ifdef CONFIG_SCHED_HAVE_PARENT
SYSCALL_LOOKUP(wait, 1)
SYSCALL_LOOKUP(waitid, 4)
#endif
#endif
/* The following can only be defined if we are configured to load
* OS modules from a file system.
*/
#ifdef CONFIG_MODULE
SYSCALL_LOOKUP(insmod, 2)
SYSCALL_LOOKUP(rmmod, 1)
SYSCALL_LOOKUP(modhandle, 1)
#endif
/* The following can only be defined if we are configured to execute
* programs from a file system.
*/
#ifndef CONFIG_BINFMT_DISABLE
#ifndef CONFIG_BUILD_KERNEL
SYSCALL_LOOKUP(exec, 4)
#endif
#ifdef CONFIG_LIBC_EXECFUNCS
SYSCALL_LOOKUP(posix_spawn, 6)
SYSCALL_LOOKUP(execve, 3)
#endif
#endif
/* The following are only defined is signals are supported in the NuttX
* configuration.
*/
SYSCALL_LOOKUP(kill, 2)
SYSCALL_LOOKUP(tgkill, 3)
#ifdef CONFIG_ENABLE_ALL_SIGNALS
SYSCALL_LOOKUP(sigaction, 3)
SYSCALL_LOOKUP(sigpending, 1)
#endif
#ifndef CONFIG_DISABLE_ALL_SIGNALS
SYSCALL_LOOKUP(sigprocmask, 3)
SYSCALL_LOOKUP(sigqueue, 3)
SYSCALL_LOOKUP(sigsuspend, 1)
SYSCALL_LOOKUP(sigtimedwait, 3)
SYSCALL_LOOKUP(sigwaitinfo, 2)
#endif
SYSCALL_LOOKUP(clock_nanosleep, 4)
/* The following are only defined if the system clock is enabled in the
* NuttX configuration.
*/
SYSCALL_LOOKUP(clock, 0)
SYSCALL_LOOKUP(clock_getres, 2)
SYSCALL_LOOKUP(clock_gettime, 2)
SYSCALL_LOOKUP(clock_settime, 2)
#ifdef CONFIG_CLOCK_ADJTIME
SYSCALL_LOOKUP(clock_adjtime, 2)
SYSCALL_LOOKUP(adjtime, 2)
2016-07-10 16:55:32 -06:00
#endif
/* The following are defined only if POSIX timers are supported */
#ifndef CONFIG_DISABLE_POSIX_TIMERS
SYSCALL_LOOKUP(timer_create, 3)
SYSCALL_LOOKUP(timer_delete, 1)
SYSCALL_LOOKUP(timer_getoverrun, 1)
SYSCALL_LOOKUP(timer_gettime, 2)
SYSCALL_LOOKUP(timer_settime, 4)
SYSCALL_LOOKUP(getitimer, 2)
SYSCALL_LOOKUP(setitimer, 3)
#endif
2016-06-19 07:03:44 -06:00
/* System logging */
#ifdef CONFIG_SYSLOG
SYSCALL_LOOKUP(nx_vsyslog, 3)
#endif
2016-06-19 07:03:44 -06:00
/* The following are defined if either file or socket descriptor are
* enabled.
*/
SYSCALL_LOOKUP(close, 1)
SYSCALL_LOOKUP(ioctl, 3)
SYSCALL_LOOKUP(read, 3)
SYSCALL_LOOKUP(write, 3)
SYSCALL_LOOKUP(readv, 3)
SYSCALL_LOOKUP(writev, 3)
SYSCALL_LOOKUP(pread, 4)
SYSCALL_LOOKUP(pwrite, 4)
#ifdef CONFIG_FS_AIO
SYSCALL_LOOKUP(aio_read, 1)
SYSCALL_LOOKUP(aio_write, 1)
SYSCALL_LOOKUP(aio_fsync, 2)
SYSCALL_LOOKUP(aio_cancel, 2)
#endif
SYSCALL_LOOKUP(poll, 3)
SYSCALL_LOOKUP(select, 5)
#ifndef CONFIG_DISABLE_ALL_SIGNALS
SYSCALL_LOOKUP(ppoll, 4)
SYSCALL_LOOKUP(pselect, 6)
#endif
#ifdef CONFIG_EVENT_FD
SYSCALL_LOOKUP(eventfd, 2)
#endif
#ifdef CONFIG_TIMER_FD
SYSCALL_LOOKUP(timerfd_create, 2)
SYSCALL_LOOKUP(timerfd_settime, 4)
SYSCALL_LOOKUP(timerfd_gettime, 2)
#endif
#ifdef CONFIG_SIGNAL_FD
SYSCALL_LOOKUP(signalfd, 3)
#endif
/* Board support */
#ifdef CONFIG_BOARDCTL
SYSCALL_LOOKUP(boardctl, 2)
#endif
/* The following are defined if file descriptors are enabled */
SYSCALL_LOOKUP(dup, 1)
SYSCALL_LOOKUP(dup2, 2)
SYSCALL_LOOKUP(fcntl, 3)
SYSCALL_LOOKUP(ftruncate, 2)
SYSCALL_LOOKUP(lseek, 3)
SYSCALL_LOOKUP(mlock, 2)
SYSCALL_LOOKUP(mlockall, 1)
SYSCALL_LOOKUP(mprotect, 3)
SYSCALL_LOOKUP(mmap, 6)
SYSCALL_LOOKUP(open, 3)
SYSCALL_LOOKUP(rename, 2)
SYSCALL_LOOKUP(stat, 2)
SYSCALL_LOOKUP(lstat, 2)
SYSCALL_LOOKUP(fstat, 2)
SYSCALL_LOOKUP(statfs, 2)
SYSCALL_LOOKUP(fstatfs, 2)
SYSCALL_LOOKUP(sendfile, 4)
SYSCALL_LOOKUP(sync, 0)
SYSCALL_LOOKUP(fsync, 1)
SYSCALL_LOOKUP(chmod, 2)
SYSCALL_LOOKUP(lchmod, 2)
SYSCALL_LOOKUP(fchmod, 2)
SYSCALL_LOOKUP(chown, 3)
SYSCALL_LOOKUP(lchown, 3)
SYSCALL_LOOKUP(fchown, 3)
SYSCALL_LOOKUP(utimens, 2)
SYSCALL_LOOKUP(lutimens, 2)
SYSCALL_LOOKUP(futimens, 2)
SYSCALL_LOOKUP(msync, 3)
SYSCALL_LOOKUP(munmap, 2)
SYSCALL_LOOKUP(munlock, 2)
SYSCALL_LOOKUP(munlockall, 0)
#if defined(CONFIG_PSEUDOFS_SOFTLINKS)
SYSCALL_LOOKUP(link, 2)
SYSCALL_LOOKUP(symlink, 2)
SYSCALL_LOOKUP(readlink, 3)
#endif
#if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
SYSCALL_LOOKUP(pipe2, 2)
#endif
#if defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0
SYSCALL_LOOKUP(nx_mkfifo, 3)
#endif
#ifndef CONFIG_DISABLE_MOUNTPOINT
SYSCALL_LOOKUP(mount, 5)
SYSCALL_LOOKUP(mkdir, 2)
SYSCALL_LOOKUP(rmdir, 1)
SYSCALL_LOOKUP(umount2, 2)
SYSCALL_LOOKUP(unlink, 1)
#endif
/* Shared memory interfaces */
#ifdef CONFIG_MM_SHM
SYSCALL_LOOKUP(shmget, 3)
SYSCALL_LOOKUP(shmat, 3)
SYSCALL_LOOKUP(shmctl, 3)
SYSCALL_LOOKUP(shmdt, 1)
#endif
#ifdef CONFIG_FS_SHMFS
SYSCALL_LOOKUP(shm_open, 3)
SYSCALL_LOOKUP(shm_unlink, 1)
#endif
/* The following are defined if the file system notify is enabled */
#ifdef CONFIG_FS_NOTIFY
SYSCALL_LOOKUP(inotify_add_watch, 3)
SYSCALL_LOOKUP(inotify_init, 0)
SYSCALL_LOOKUP(inotify_init1, 1)
SYSCALL_LOOKUP(inotify_rm_watch, 2)
#endif
/* The following are defined if pthreads are enabled */
#ifndef CONFIG_DISABLE_PTHREAD
SYSCALL_LOOKUP(pthread_cancel, 1)
SYSCALL_LOOKUP(nx_pthread_create, 5)
SYSCALL_LOOKUP(pthread_detach, 1)
SYSCALL_LOOKUP(nx_pthread_exit, 1)
SYSCALL_LOOKUP(pthread_getschedparam, 3)
SYSCALL_LOOKUP(pthread_join, 2)
SYSCALL_LOOKUP(pthread_setschedparam, 3)
SYSCALL_LOOKUP(pthread_setschedprio, 2)
Squashed commit of the following: libs/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. syscall/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. wireless/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. Documentation/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. include/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. drivers/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. sched/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. configs: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/xtensa: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/z80: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/x86: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/renesas and arch/risc-v: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/or1k: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/misoc: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/mips: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/avr: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/arm: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled.
2019-04-29 14:52:05 -06:00
#ifdef CONFIG_SMP
SYSCALL_LOOKUP(pthread_setaffinity_np, 3)
SYSCALL_LOOKUP(pthread_getaffinity_np, 3)
Squashed commit of the following: libs/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. syscall/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. wireless/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. Documentation/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. include/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. drivers/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. sched/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. configs: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/xtensa: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/z80: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/x86: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/renesas and arch/risc-v: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled. arch/or1k: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/misoc: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/mips: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/avr: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled. arch/arm: Remove all references to CONFIG_DISABLE_SIGNALS. Signals are always enabled.
2019-04-29 14:52:05 -06:00
#endif
SYSCALL_LOOKUP(pthread_sigmask, 3)
#endif
/* The following are defined only if message queues are enabled */
#ifndef CONFIG_DISABLE_MQUEUE
SYSCALL_LOOKUP(mq_close, 1)
SYSCALL_LOOKUP(mq_getattr, 2)
SYSCALL_LOOKUP(mq_notify, 2)
SYSCALL_LOOKUP(mq_open, 4)
SYSCALL_LOOKUP(mq_receive, 4)
SYSCALL_LOOKUP(mq_send, 4)
SYSCALL_LOOKUP(mq_setattr, 3)
SYSCALL_LOOKUP(mq_timedreceive, 5)
SYSCALL_LOOKUP(mq_timedsend, 5)
SYSCALL_LOOKUP(mq_unlink, 1)
#endif
/* The following are defined only if environment variables are supported */
#ifndef CONFIG_DISABLE_ENVIRON
SYSCALL_LOOKUP(get_environ_ptr, 0)
SYSCALL_LOOKUP(clearenv, 0)
SYSCALL_LOOKUP(getenv, 1)
SYSCALL_LOOKUP(putenv, 1)
SYSCALL_LOOKUP(setenv, 3)
SYSCALL_LOOKUP(unsetenv, 1)
#endif
/* The following are defined only if networking AND sockets are supported */
#ifdef CONFIG_NET
SYSCALL_LOOKUP(accept4, 4)
SYSCALL_LOOKUP(bind, 3)
SYSCALL_LOOKUP(connect, 3)
SYSCALL_LOOKUP(getpeername, 3)
SYSCALL_LOOKUP(getsockname, 3)
SYSCALL_LOOKUP(getsockopt, 5)
SYSCALL_LOOKUP(listen, 2)
SYSCALL_LOOKUP(recv, 4)
SYSCALL_LOOKUP(recvfrom, 6)
SYSCALL_LOOKUP(recvmsg, 3)
SYSCALL_LOOKUP(send, 4)
SYSCALL_LOOKUP(sendto, 6)
SYSCALL_LOOKUP(sendmsg, 3)
SYSCALL_LOOKUP(setsockopt, 5)
SYSCALL_LOOKUP(shutdown, 2)
SYSCALL_LOOKUP(socket, 3)
SYSCALL_LOOKUP(socketpair, 4)
#endif
SYSCALL_LOOKUP(nanosleep, 2)
/* I/O event notification facility */
SYSCALL_LOOKUP(epoll_close, 1)
SYSCALL_LOOKUP(epoll_create, 1)
SYSCALL_LOOKUP(epoll_create1, 1)
SYSCALL_LOOKUP(epoll_ctl, 4)
SYSCALL_LOOKUP(epoll_pwait, 5)
SYSCALL_LOOKUP(epoll_wait, 4)
/* POSIX timers */
SYSCALL_LOOKUP(time, 1)
SYSCALL_LOOKUP(gettimeofday, 2)
SYSCALL_LOOKUP(settimeofday, 2)
/* ANSI C signal handling */
#ifdef CONFIG_ENABLE_ALL_SIGNALS
SYSCALL_LOOKUP(signal, 2)
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
SYSCALL_LOOKUP(sched_note_vprintf_ip, 5)
SYSCALL_LOOKUP(sched_note_event_ip, 5)
#endif