2013-03-06 20:56:32 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* syscall/syscall_lookup.h
|
|
|
|
*
|
2020-03-21 18:02:42 +01:00
|
|
|
* 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
|
2013-03-06 20:56:32 +01:00
|
|
|
*
|
2020-03-21 18:02:42 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2013-03-06 20:56:32 +01:00
|
|
|
*
|
2020-03-21 18:02:42 +01:00
|
|
|
* 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.
|
2013-03-06 20:56:32 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* SYSCALL_LOOKUP must be defined before including this file.
|
|
|
|
*
|
|
|
|
* These first system calls are supported regardless of the NuttX
|
|
|
|
* configuration
|
|
|
|
*/
|
|
|
|
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP1(_exit, 1, STUB__exit)
|
|
|
|
SYSCALL_LOOKUP(exit, 1, STUB_exit)
|
|
|
|
SYSCALL_LOOKUP(get_errno, 0, STUB_get_errno)
|
|
|
|
SYSCALL_LOOKUP(getpid, 0, STUB_getpid)
|
2020-01-31 21:25:15 +01:00
|
|
|
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(sched_getparam, 2, STUB_sched_getparam)
|
|
|
|
SYSCALL_LOOKUP(sched_getscheduler, 1, STUB_sched_getscheduler)
|
|
|
|
SYSCALL_LOOKUP(sched_lock, 0, STUB_sched_lock)
|
|
|
|
SYSCALL_LOOKUP(sched_lockcount, 0, STUB_sched_lockcount)
|
|
|
|
SYSCALL_LOOKUP(sched_rr_get_interval, 2, STUB_sched_rr_get_interval)
|
|
|
|
SYSCALL_LOOKUP(sched_setparam, 2, STUB_sched_setparam)
|
|
|
|
SYSCALL_LOOKUP(sched_setscheduler, 3, STUB_sched_setscheduler)
|
|
|
|
SYSCALL_LOOKUP(sched_unlock, 0, STUB_sched_unlock)
|
|
|
|
SYSCALL_LOOKUP(sched_yield, 0, STUB_sched_yield)
|
2020-05-03 22:16:36 +02:00
|
|
|
SYSCALL_LOOKUP(sched_get_stackinfo, 2, STUB_sched_get_stackinfo)
|
2020-02-09 08:38:50 +01:00
|
|
|
|
2020-01-31 21:25:15 +01:00
|
|
|
#ifdef CONFIG_SMP
|
2020-02-09 08:38:50 +01:00
|
|
|
SYSCALL_LOOKUP(sched_getaffinity, 3, STUB_sched_getaffinity)
|
2020-01-31 21:25:15 +01:00
|
|
|
SYSCALL_LOOKUP(sched_getcpu, 0, STUB_sched_getcpu)
|
2020-02-09 08:38:50 +01:00
|
|
|
SYSCALL_LOOKUP(sched_setaffinity, 3, STUB_sched_setaffinity)
|
2020-01-31 21:25:15 +01:00
|
|
|
#endif
|
|
|
|
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(set_errno, 1, STUB_set_errno)
|
|
|
|
SYSCALL_LOOKUP(uname, 1, STUB_uname)
|
2014-09-28 20:19:01 +02:00
|
|
|
|
2019-08-06 22:13:43 +02:00
|
|
|
/* User identity */
|
|
|
|
|
|
|
|
#ifdef CONFIG_SCHED_USER_IDENTITY
|
|
|
|
SYSCALL_LOOKUP(setuid, 1, STUB_setuid)
|
|
|
|
SYSCALL_LOOKUP(getuid, 0, STUB_getuid)
|
|
|
|
SYSCALL_LOOKUP(setgid, 1, STUB_setgid)
|
|
|
|
SYSCALL_LOOKUP(getgid, 0, STUB_getgid)
|
|
|
|
#endif
|
|
|
|
|
2014-09-28 20:19:01 +02:00
|
|
|
/* Semaphores */
|
|
|
|
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(sem_destroy, 1, STUB_sem_destroy)
|
|
|
|
SYSCALL_LOOKUP(sem_post, 1, STUB_sem_post)
|
|
|
|
SYSCALL_LOOKUP(sem_timedwait, 2, STUB_sem_timedwait)
|
|
|
|
SYSCALL_LOOKUP(sem_trywait, 1, STUB_sem_trywait)
|
|
|
|
SYSCALL_LOOKUP(sem_wait, 1, STUB_sem_wait)
|
2014-09-28 20:19:01 +02:00
|
|
|
|
2016-11-02 16:05:18 +01:00
|
|
|
#ifdef CONFIG_PRIORITY_INHERITANCE
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(sem_setprotocol, 2, STUB_sem_setprotocol)
|
2016-11-02 16:05:18 +01:00
|
|
|
#endif
|
|
|
|
|
2014-09-28 20:19:01 +02:00
|
|
|
/* Named semaphores */
|
|
|
|
|
2014-09-29 15:54:45 +02:00
|
|
|
#ifdef CONFIG_FS_NAMED_SEMAPHORES
|
Improve proxy/stub parameter passing for variadic OS interfaces.
In the past a very low effort interface was used:
- All parmeters were treated as though they were type uinptr_t, and
- The maximum number of parmeters (6) was passed in all cases.
The first is potentially wrong and the second is very inefficient. This commit improves this by:
- Making tools/mksyscall.c more intelligent, and
- Extending the syntax for variadic functions.
For example, in syscall.cvs, the open() API was represened like this:
"open","fcntl.h","","int","const char*","int","..."
In reality, open may take only a single optional argument of type mode_t which is not the same size as uintptr_t. And there is not reason to pass 6 parameters in that case.
And this has been extended to:
"open","fcntl.h","","int","const char*","int","...","mode_t"
The existence of the "mode_t" tells tools/mksyscall that there is at most one optional parameter and, if present, it is of type mode_t.
2020-05-05 23:02:07 +02:00
|
|
|
SYSCALL_LOOKUP(sem_open, 4, STUB_sem_open)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(sem_close, 1, STUB_sem_close)
|
|
|
|
SYSCALL_LOOKUP(sem_unlink, 1, STUB_sem_unlink)
|
2014-09-28 20:19:01 +02:00
|
|
|
#endif
|
|
|
|
|
2014-09-16 23:37:05 +02:00
|
|
|
#ifndef CONFIG_BUILD_KERNEL
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(task_create, 5, STUB_task_create)
|
2020-05-02 12:36:48 +02:00
|
|
|
#ifdef CONFIG_LIB_SYSCALL
|
2019-08-23 21:20:52 +02:00
|
|
|
SYSCALL_LOOKUP(nx_task_spawn, 1, STUB_nx_task_spawn)
|
2019-08-28 00:41:07 +02:00
|
|
|
#endif
|
2014-09-16 23:37:05 +02:00
|
|
|
#else
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(pgalloc, 2, STUB_pgalloc)
|
2014-08-27 22:19:41 +02:00
|
|
|
#endif
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(task_delete, 1, STUB_task_delete)
|
|
|
|
SYSCALL_LOOKUP(task_restart, 1, STUB_task_restart)
|
|
|
|
SYSCALL_LOOKUP(task_setcancelstate, 2, STUB_task_setcancelstate)
|
|
|
|
SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
2013-03-06 20:56:32 +01:00
|
|
|
|
2016-12-10 23:06:14 +01:00
|
|
|
# ifdef CONFIG_CANCELLATION_POINTS
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(task_setcanceltype, 2, STUB_task_setcanceltype)
|
|
|
|
SYSCALL_LOOKUP(task_testcancel, 0, STUB_task_testcancel)
|
2016-12-10 23:06:14 +01:00
|
|
|
# endif
|
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/* The following can be individually enabled */
|
|
|
|
|
2019-07-10 15:25:00 +02:00
|
|
|
#if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(vfork, 0, STUB_vfork)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_SCHED_ATEXIT
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(atexit, 1, STUB_atexit)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_SCHED_ONEXIT
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(on_exit, 2, STUB_on_exit)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_SCHED_WAITPID
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(waitpid, 3, STUB_waitpid)
|
2013-03-06 20:56:32 +01:00
|
|
|
# ifdef CONFIG_SCHED_HAVE_PARENT
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(wait, 1, STUB_wait)
|
|
|
|
SYSCALL_LOOKUP(waitid, 4, STUB_waitid)
|
2013-03-06 20:56:32 +01:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2015-12-12 18:11:09 +01:00
|
|
|
/* The following can only be defined if we are configured to load
|
|
|
|
* OS modules from a file system.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef CONFIG_MODULE
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(insmod, 2, STUB_insmod)
|
|
|
|
SYSCALL_LOOKUP(rmmod, 1, STUB_rmmod)
|
|
|
|
SYSCALL_LOOKUP(modhandle, 1, STUB_modhandle)
|
2015-12-12 18:11:09 +01:00
|
|
|
#endif
|
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/* The following can only be defined if we are configured to execute
|
|
|
|
* programs from a file system.
|
|
|
|
*/
|
|
|
|
|
2017-10-03 15:09:35 +02:00
|
|
|
#ifndef CONFIG_BINFMT_DISABLE
|
|
|
|
#ifndef CONFIG_BUILD_KERNEL
|
|
|
|
SYSCALL_LOOKUP(exec, 4, STUB_exec)
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_LIBC_EXECFUNCS
|
2018-11-08 14:27:14 +01:00
|
|
|
#ifdef CONFIG_LIB_ENVPATH
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(posix_spawnp, 6, STUB_posix_spawnp)
|
2017-10-03 15:09:35 +02:00
|
|
|
#else
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(posix_spawn, 6, STUB_posix_spawn)
|
2017-10-03 15:09:35 +02:00
|
|
|
#endif
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(execv, 2, STUB_execv)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
2017-10-03 15:09:35 +02:00
|
|
|
#endif
|
2013-03-06 20:56:32 +01:00
|
|
|
|
|
|
|
/* The following are only defined is signals are supported in the NuttX
|
|
|
|
* configuration.
|
|
|
|
*/
|
|
|
|
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(kill, 2, STUB_kill)
|
|
|
|
SYSCALL_LOOKUP(sigaction, 3, STUB_sigaction)
|
|
|
|
SYSCALL_LOOKUP(sigpending, 1, STUB_sigpending)
|
|
|
|
SYSCALL_LOOKUP(sigprocmask, 3, STUB_sigprocmask)
|
|
|
|
SYSCALL_LOOKUP(sigqueue, 3, STUB_sigqueue)
|
|
|
|
SYSCALL_LOOKUP(sigsuspend, 1, STUB_sigsuspend)
|
|
|
|
SYSCALL_LOOKUP(sigtimedwait, 3, STUB_sigtimedwait)
|
|
|
|
SYSCALL_LOOKUP(sigwaitinfo, 2, STUB_sigwaitinfo)
|
2017-11-12 00:44:59 +01:00
|
|
|
SYSCALL_LOOKUP(clock_nanosleep, 4, STUB_clock_nanosleep)
|
2013-03-06 20:56:32 +01:00
|
|
|
|
|
|
|
/* The following are only defined if the system clock is enabled in the
|
|
|
|
* NuttX configuration.
|
|
|
|
*/
|
|
|
|
|
2018-06-16 20:50:28 +02:00
|
|
|
SYSCALL_LOOKUP(syscall_clock, 0, STUB_clock)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
|
|
|
|
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
|
|
|
|
SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime)
|
2016-07-11 14:54:02 +02:00
|
|
|
#ifdef CONFIG_CLOCK_TIMEKEEPING
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime)
|
2016-07-11 00:55:32 +02:00
|
|
|
#endif
|
2013-03-06 20:56:32 +01:00
|
|
|
|
|
|
|
/* The following are defined only if POSIX timers are supported */
|
|
|
|
|
|
|
|
#ifndef CONFIG_DISABLE_POSIX_TIMERS
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(timer_create, 3, STUB_timer_create)
|
|
|
|
SYSCALL_LOOKUP(timer_delete, 1, STUB_timer_delete)
|
|
|
|
SYSCALL_LOOKUP(timer_getoverrun, 1, STUB_timer_getoverrun)
|
|
|
|
SYSCALL_LOOKUP(timer_gettime, 2, STUB_timer_gettime)
|
|
|
|
SYSCALL_LOOKUP(timer_settime, 4, STUB_timer_settime)
|
2019-11-14 22:10:04 +01:00
|
|
|
SYSCALL_LOOKUP(getitimer, 2, STUB_getitimer)
|
|
|
|
SYSCALL_LOOKUP(setitimer, 3, STUB_setitimer)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
2016-06-19 15:03:44 +02:00
|
|
|
/* System logging */
|
|
|
|
|
2018-03-04 15:07:07 +01:00
|
|
|
SYSCALL_LOOKUP(nx_vsyslog, 3, STUB_nx_vsyslog)
|
2016-06-19 15:03:44 +02:00
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/* The following are defined if either file or socket descriptor are
|
|
|
|
* enabled.
|
|
|
|
*/
|
|
|
|
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(close, 1, STUB_close)
|
Improve proxy/stub parameter passing for variadic OS interfaces.
In the past a very low effort interface was used:
- All parmeters were treated as though they were type uinptr_t, and
- The maximum number of parmeters (6) was passed in all cases.
The first is potentially wrong and the second is very inefficient. This commit improves this by:
- Making tools/mksyscall.c more intelligent, and
- Extending the syntax for variadic functions.
For example, in syscall.cvs, the open() API was represened like this:
"open","fcntl.h","","int","const char*","int","..."
In reality, open may take only a single optional argument of type mode_t which is not the same size as uintptr_t. And there is not reason to pass 6 parameters in that case.
And this has been extended to:
"open","fcntl.h","","int","const char*","int","...","mode_t"
The existence of the "mode_t" tells tools/mksyscall that there is at most one optional parameter and, if present, it is of type mode_t.
2020-05-05 23:02:07 +02:00
|
|
|
SYSCALL_LOOKUP(ioctl, 3, STUB_ioctl)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(read, 3, STUB_read)
|
|
|
|
SYSCALL_LOOKUP(write, 3, STUB_write)
|
|
|
|
SYSCALL_LOOKUP(pread, 4, STUB_pread)
|
|
|
|
SYSCALL_LOOKUP(pwrite, 4, STUB_pwrite)
|
2019-02-11 19:09:26 +01:00
|
|
|
#ifdef CONFIG_FS_AIO
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(aio_read, 1, STUB_aio_read)
|
|
|
|
SYSCALL_LOOKUP(aio_write, 1, STUB_aio_write)
|
|
|
|
SYSCALL_LOOKUP(aio_fsync, 2, STUB_aio_fsync)
|
|
|
|
SYSCALL_LOOKUP(aio_cancel, 2, STUB_aio_cancel)
|
2019-02-11 19:09:26 +01:00
|
|
|
#endif
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(poll, 3, STUB_poll)
|
|
|
|
SYSCALL_LOOKUP(select, 5, STUB_select)
|
2018-11-08 14:45:23 +01:00
|
|
|
SYSCALL_LOOKUP(ppoll, 4, STUB_ppoll)
|
|
|
|
SYSCALL_LOOKUP(pselect, 6, STUB_pselect)
|
2019-02-11 19:09:26 +01:00
|
|
|
#ifdef CONFIG_NETDEV_IFINDEX
|
2018-06-25 20:41:28 +02:00
|
|
|
SYSCALL_LOOKUP(if_indextoname, 2, STUB_if_indextoname)
|
|
|
|
SYSCALL_LOOKUP(if_nametoindex, 1, STUB_if_nametoindex)
|
2019-02-11 19:09:26 +01:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SERIAL_TERMIOS
|
2017-10-06 18:55:36 +02:00
|
|
|
SYSCALL_LOOKUP(tcdrain, 1, STUB_tcdrain)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
2015-03-31 19:25:52 +02:00
|
|
|
/* Board support */
|
|
|
|
|
|
|
|
#ifdef CONFIG_LIB_BOARDCTL
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(boardctl, 2, STUB_boardctl)
|
2015-03-31 19:25:52 +02:00
|
|
|
#endif
|
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/* The following are defined if file descriptors are enabled */
|
|
|
|
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(closedir, 1, STUB_closedir)
|
|
|
|
SYSCALL_LOOKUP(dup, 1, STUB_dup)
|
|
|
|
SYSCALL_LOOKUP(dup2, 2, STUB_dup2)
|
2020-05-06 17:36:16 +02:00
|
|
|
SYSCALL_LOOKUP(fcntl, 3, STUB_fcntl)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(lseek, 3, STUB_lseek)
|
|
|
|
SYSCALL_LOOKUP(mmap, 6, STUB_mmap)
|
Improve proxy/stub parameter passing for variadic OS interfaces.
In the past a very low effort interface was used:
- All parmeters were treated as though they were type uinptr_t, and
- The maximum number of parmeters (6) was passed in all cases.
The first is potentially wrong and the second is very inefficient. This commit improves this by:
- Making tools/mksyscall.c more intelligent, and
- Extending the syntax for variadic functions.
For example, in syscall.cvs, the open() API was represened like this:
"open","fcntl.h","","int","const char*","int","..."
In reality, open may take only a single optional argument of type mode_t which is not the same size as uintptr_t. And there is not reason to pass 6 parameters in that case.
And this has been extended to:
"open","fcntl.h","","int","const char*","int","...","mode_t"
The existence of the "mode_t" tells tools/mksyscall that there is at most one optional parameter and, if present, it is of type mode_t.
2020-05-05 23:02:07 +02:00
|
|
|
SYSCALL_LOOKUP(open, 3, STUB_open)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(opendir, 1, STUB_opendir)
|
|
|
|
SYSCALL_LOOKUP(readdir, 1, STUB_readdir)
|
|
|
|
SYSCALL_LOOKUP(rewinddir, 1, STUB_rewinddir)
|
|
|
|
SYSCALL_LOOKUP(seekdir, 2, STUB_seekdir)
|
|
|
|
SYSCALL_LOOKUP(stat, 2, STUB_stat)
|
|
|
|
SYSCALL_LOOKUP(fstat, 2, STUB_fstat)
|
|
|
|
SYSCALL_LOOKUP(statfs, 2, STUB_statfs)
|
|
|
|
SYSCALL_LOOKUP(fstatfs, 2, STUB_fstatfs)
|
|
|
|
SYSCALL_LOOKUP(telldir, 1, STUB_telldir)
|
2013-03-06 20:56:32 +01:00
|
|
|
|
2019-04-05 04:37:32 +02:00
|
|
|
#if defined(CONFIG_FS_RAMMAP)
|
|
|
|
SYSCALL_LOOKUP(munmap, 2, STUB_munmap)
|
|
|
|
#endif
|
|
|
|
|
2019-02-11 19:09:26 +01:00
|
|
|
#if defined(CONFIG_PSEUDOFS_SOFTLINKS)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(link, 2, STUB_link)
|
|
|
|
SYSCALL_LOOKUP(readlink, 3, STUB_readlink)
|
2019-02-11 19:09:26 +01:00
|
|
|
#endif
|
2017-02-03 00:11:08 +01:00
|
|
|
|
2019-02-11 19:09:26 +01:00
|
|
|
#if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
|
2020-05-04 08:49:38 +02:00
|
|
|
SYSCALL_LOOKUP(nx_pipe, 2, STUB_nx_pipe)
|
|
|
|
SYSCALL_LOOKUP(nx_mkfifo, 3, STUB_nx_mkfifo)
|
2019-02-11 19:09:26 +01:00
|
|
|
#endif
|
2016-07-20 23:26:54 +02:00
|
|
|
|
2019-02-11 19:09:26 +01:00
|
|
|
#if CONFIG_NFILE_STREAMS > 0
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(fdopen, 3, STUB_fs_fdopen)
|
|
|
|
SYSCALL_LOOKUP(sched_getstreams, 0, STUB_sched_getstreams)
|
2019-02-11 19:09:26 +01:00
|
|
|
#endif
|
2013-09-28 22:47:49 +02:00
|
|
|
|
2019-02-11 19:09:26 +01:00
|
|
|
#if defined(CONFIG_NET_SENDFILE)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(sendfile, 4, STUB_fs_sendifile)
|
2019-02-11 19:09:26 +01:00
|
|
|
#endif
|
2013-03-06 20:56:32 +01:00
|
|
|
|
2019-02-11 19:09:26 +01:00
|
|
|
#if !defined(CONFIG_DISABLE_MOUNTPOINT)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(mount, 5, STUB_mount)
|
|
|
|
SYSCALL_LOOKUP(fsync, 1, STUB_fsync)
|
2018-01-03 23:03:56 +01:00
|
|
|
SYSCALL_LOOKUP(ftruncate, 2, STUB_ftruncate)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(mkdir, 2, STUB_mkdir)
|
|
|
|
SYSCALL_LOOKUP(rename, 2, STUB_rename)
|
|
|
|
SYSCALL_LOOKUP(rmdir, 1, STUB_rmdir)
|
|
|
|
SYSCALL_LOOKUP(umount2, 2, STUB_umount2)
|
|
|
|
SYSCALL_LOOKUP(unlink, 1, STUB_unlink)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
2014-09-22 23:24:09 +02:00
|
|
|
/* Shared memory interfaces */
|
|
|
|
|
|
|
|
#ifdef CONFIG_MM_SHM
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(shmget, 3, STUB_shmget)
|
|
|
|
SYSCALL_LOOKUP(shmat, 3, STUB_shmat)
|
|
|
|
SYSCALL_LOOKUP(shmctl, 3, STUB_shmctl)
|
|
|
|
SYSCALL_LOOKUP(shmdt, 1, STUB_shmdt)
|
2014-09-22 23:24:09 +02:00
|
|
|
#endif
|
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/* The following are defined if pthreads are enabled */
|
|
|
|
|
|
|
|
#ifndef CONFIG_DISABLE_PTHREAD
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(pthread_cancel, 1, STUB_pthread_cancel)
|
|
|
|
SYSCALL_LOOKUP(pthread_cond_broadcast, 1, STUB_pthread_cond_broadcast)
|
|
|
|
SYSCALL_LOOKUP(pthread_cond_signal, 1, STUB_pthread_cond_signal)
|
|
|
|
SYSCALL_LOOKUP(pthread_cond_wait, 2, STUB_pthread_cond_wait)
|
|
|
|
SYSCALL_LOOKUP(pthread_create, 4, STUB_pthread_create)
|
|
|
|
SYSCALL_LOOKUP(pthread_detach, 1, STUB_pthread_detach)
|
|
|
|
SYSCALL_LOOKUP(pthread_exit, 1, STUB_pthread_exit)
|
|
|
|
SYSCALL_LOOKUP(pthread_getschedparam, 3, STUB_pthread_getschedparam)
|
|
|
|
SYSCALL_LOOKUP(pthread_getspecific, 1, STUB_pthread_getspecific)
|
|
|
|
SYSCALL_LOOKUP(pthread_join, 2, STUB_pthread_join)
|
|
|
|
SYSCALL_LOOKUP(pthread_key_create, 2, STUB_pthread_key_create)
|
|
|
|
SYSCALL_LOOKUP(pthread_key_delete, 1, STUB_pthread_key_delete)
|
|
|
|
SYSCALL_LOOKUP(pthread_mutex_destroy, 1, STUB_pthread_mutex_destroy)
|
|
|
|
SYSCALL_LOOKUP(pthread_mutex_init, 2, STUB_pthread_mutex_init)
|
2019-02-26 01:19:13 +01:00
|
|
|
SYSCALL_LOOKUP(pthread_mutex_timedlock, 2, STUB_pthread_mutex_timedlock)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(pthread_mutex_trylock, 1, STUB_pthread_mutex_trylock)
|
|
|
|
SYSCALL_LOOKUP(pthread_mutex_unlock, 1, STUB_pthread_mutex_unlock)
|
|
|
|
#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE
|
2017-03-27 17:38:27 +02:00
|
|
|
SYSCALL_LOOKUP(pthread_mutex_consistent, 1, STUB_pthread_mutex_consistent)
|
2017-03-27 17:36:03 +02:00
|
|
|
#endif
|
|
|
|
SYSCALL_LOOKUP(pthread_setschedparam, 3, STUB_pthread_setschedparam)
|
|
|
|
SYSCALL_LOOKUP(pthread_setschedprio, 2, STUB_pthread_setschedprio)
|
|
|
|
SYSCALL_LOOKUP(pthread_setspecific, 2, STUB_pthread_setspecific)
|
2019-04-29 22:52:05 +02:00
|
|
|
#ifdef CONFIG_SMP
|
2020-05-07 09:25:18 +02:00
|
|
|
SYSCALL_LOOKUP(pthread_setaffinity_np, 3, STUB_pthread_setaffinity_np)
|
|
|
|
SYSCALL_LOOKUP(pthread_getaffinity_np, 3, STUB_pthread_getaffinity_np)
|
2019-04-29 22:52:05 +02:00
|
|
|
#endif
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(pthread_cond_timedwait, 3, STUB_pthread_cond_timedwait)
|
|
|
|
SYSCALL_LOOKUP(pthread_kill, 2, STUB_pthread_kill)
|
|
|
|
SYSCALL_LOOKUP(pthread_sigmask, 3, STUB_pthread_sigmask)
|
2019-04-29 22:52:05 +02:00
|
|
|
#ifdef CONFIG_PTHREAD_CLEANUP
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(pthread_cleanup_push, 2, STUB_pthread_cleanup_push)
|
|
|
|
SYSCALL_LOOKUP(pthread_cleanup_pop, 1, STUB_pthread_cleanup_pop)
|
2019-04-29 22:52:05 +02:00
|
|
|
#endif
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The following are defined only if message queues are enabled */
|
|
|
|
|
|
|
|
#ifndef CONFIG_DISABLE_MQUEUE
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(mq_close, 1, STUB_mq_close)
|
|
|
|
SYSCALL_LOOKUP(mq_getattr, 2, STUB_mq_getattr)
|
|
|
|
SYSCALL_LOOKUP(mq_notify, 2, STUB_mq_notify)
|
Improve proxy/stub parameter passing for variadic OS interfaces.
In the past a very low effort interface was used:
- All parmeters were treated as though they were type uinptr_t, and
- The maximum number of parmeters (6) was passed in all cases.
The first is potentially wrong and the second is very inefficient. This commit improves this by:
- Making tools/mksyscall.c more intelligent, and
- Extending the syntax for variadic functions.
For example, in syscall.cvs, the open() API was represened like this:
"open","fcntl.h","","int","const char*","int","..."
In reality, open may take only a single optional argument of type mode_t which is not the same size as uintptr_t. And there is not reason to pass 6 parameters in that case.
And this has been extended to:
"open","fcntl.h","","int","const char*","int","...","mode_t"
The existence of the "mode_t" tells tools/mksyscall that there is at most one optional parameter and, if present, it is of type mode_t.
2020-05-05 23:02:07 +02:00
|
|
|
SYSCALL_LOOKUP(mq_open, 4, STUB_mq_open)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(mq_receive, 4, STUB_mq_receive)
|
|
|
|
SYSCALL_LOOKUP(mq_send, 4, STUB_mq_send)
|
|
|
|
SYSCALL_LOOKUP(mq_setattr, 3, STUB_mq_setattr)
|
|
|
|
SYSCALL_LOOKUP(mq_timedreceive, 5, STUB_mq_timedreceive)
|
|
|
|
SYSCALL_LOOKUP(mq_timedsend, 5, STUB_mq_timedsend)
|
|
|
|
SYSCALL_LOOKUP(mq_unlink, 1, STUB_mq_unlink)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The following are defined only if environment variables are supported */
|
|
|
|
|
|
|
|
#ifndef CONFIG_DISABLE_ENVIRON
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(clearenv, 0, STUB_clearenv)
|
|
|
|
SYSCALL_LOOKUP(getenv, 1, STUB_getenv)
|
|
|
|
SYSCALL_LOOKUP(putenv, 1, STUB_putenv)
|
|
|
|
SYSCALL_LOOKUP(setenv, 3, STUB_setenv)
|
|
|
|
SYSCALL_LOOKUP(unsetenv, 1, STUB_unsetenv)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
2015-07-10 23:41:20 +02:00
|
|
|
/* The following are defined only if netdb is supported */
|
2015-07-05 16:40:56 +02:00
|
|
|
|
2015-07-10 23:41:20 +02:00
|
|
|
#ifdef CONFIG_LIBC_NETDB
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(sethostname, 2, STUB_sethostname)
|
2015-07-10 23:41:20 +02:00
|
|
|
#endif
|
2015-07-05 16:40:56 +02:00
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/* The following are defined only if networking AND sockets are supported */
|
|
|
|
|
2019-02-12 01:08:49 +01:00
|
|
|
#ifdef CONFIG_NET
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(accept, 3, STUB_accept)
|
|
|
|
SYSCALL_LOOKUP(bind, 3, STUB_bind)
|
|
|
|
SYSCALL_LOOKUP(connect, 3, STUB_connect)
|
2018-07-19 15:30:01 +02:00
|
|
|
SYSCALL_LOOKUP(getpeername, 3, STUB_getpeername)
|
|
|
|
SYSCALL_LOOKUP(getsockname, 3, STUB_getsockname)
|
2017-03-27 17:36:03 +02:00
|
|
|
SYSCALL_LOOKUP(getsockopt, 5, STUB_getsockopt)
|
|
|
|
SYSCALL_LOOKUP(listen, 2, STUB_listen)
|
|
|
|
SYSCALL_LOOKUP(recv, 4, STUB_recv)
|
|
|
|
SYSCALL_LOOKUP(recvfrom, 6, STUB_recvfrom)
|
|
|
|
SYSCALL_LOOKUP(send, 4, STUB_send)
|
|
|
|
SYSCALL_LOOKUP(sendto, 6, STUB_sendto)
|
|
|
|
SYSCALL_LOOKUP(setsockopt, 5, STUB_setsockopt)
|
|
|
|
SYSCALL_LOOKUP(socket, 3, STUB_socket)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The following is defined only if CONFIG_TASK_NAME_SIZE > 0 */
|
|
|
|
|
|
|
|
#if CONFIG_TASK_NAME_SIZE > 0
|
Improve proxy/stub parameter passing for variadic OS interfaces.
In the past a very low effort interface was used:
- All parmeters were treated as though they were type uinptr_t, and
- The maximum number of parmeters (6) was passed in all cases.
The first is potentially wrong and the second is very inefficient. This commit improves this by:
- Making tools/mksyscall.c more intelligent, and
- Extending the syntax for variadic functions.
For example, in syscall.cvs, the open() API was represened like this:
"open","fcntl.h","","int","const char*","int","..."
In reality, open may take only a single optional argument of type mode_t which is not the same size as uintptr_t. And there is not reason to pass 6 parameters in that case.
And this has been extended to:
"open","fcntl.h","","int","const char*","int","...","mode_t"
The existence of the "mode_t" tells tools/mksyscall that there is at most one optional parameter and, if present, it is of type mode_t.
2020-05-05 23:02:07 +02:00
|
|
|
SYSCALL_LOOKUP(prctl, 2, STUB_prctl)
|
2013-03-06 20:56:32 +01:00
|
|
|
#endif
|
|
|
|
|
2017-03-30 15:38:37 +02:00
|
|
|
/* The following is defined only if entropy pool random number generator
|
2020-02-09 14:32:52 +01:00
|
|
|
* is enabled.
|
|
|
|
*/
|
2017-03-30 15:38:37 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_CRYPTO_RANDOM_POOL
|
Improve proxy/stub parameter passing for variadic OS interfaces.
In the past a very low effort interface was used:
- All parmeters were treated as though they were type uinptr_t, and
- The maximum number of parmeters (6) was passed in all cases.
The first is potentially wrong and the second is very inefficient. This commit improves this by:
- Making tools/mksyscall.c more intelligent, and
- Extending the syntax for variadic functions.
For example, in syscall.cvs, the open() API was represened like this:
"open","fcntl.h","","int","const char*","int","..."
In reality, open may take only a single optional argument of type mode_t which is not the same size as uintptr_t. And there is not reason to pass 6 parameters in that case.
And this has been extended to:
"open","fcntl.h","","int","const char*","int","...","mode_t"
The existence of the "mode_t" tells tools/mksyscall that there is at most one optional parameter and, if present, it is of type mode_t.
2020-05-05 23:02:07 +02:00
|
|
|
SYSCALL_LOOKUP(getrandom, 2, STUB_getrandom)
|
2017-03-30 15:38:37 +02:00
|
|
|
#endif
|
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/****************************************************************************
|
2020-02-09 14:32:52 +01:00
|
|
|
* Public Function Prototypes
|
2013-03-06 20:56:32 +01:00
|
|
|
****************************************************************************/
|