1
0
Fork 0
forked from nuttx/nuttx-update

syscall: Generate STUB prototype automatically

reduce the maintainance effort

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-05-06 12:20:26 +08:00 committed by patacongo
parent 32cec2a439
commit 1ad03a5a13
5 changed files with 236 additions and 568 deletions

View file

@ -61,9 +61,9 @@
enum
{
# define SYSCALL_LOOKUP_(f) SYS_##f
# define SYSCALL_LOOKUP1(f,n,p) SYSCALL_LOOKUP_(f) = CONFIG_SYS_RESERVED
# define SYSCALL_LOOKUP(f,n,p) , SYSCALL_LOOKUP_(f)
# define SYSCALL_LOOKUP_(f) SYS_##f
# define SYSCALL_LOOKUP1(f,n) SYSCALL_LOOKUP_(f) = CONFIG_SYS_RESERVED
# define SYSCALL_LOOKUP(f,n) , SYSCALL_LOOKUP_(f)
# include "syscall_lookup.h"
, SYS_maxsyscall
# undef SYSCALL_LOOKUP_

View file

@ -24,98 +24,98 @@
* configuration
*/
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)
SYSCALL_LOOKUP1(_exit, 1)
SYSCALL_LOOKUP(exit, 1)
SYSCALL_LOOKUP(get_errno, 0)
SYSCALL_LOOKUP(getpid, 0)
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)
SYSCALL_LOOKUP(sched_get_stackinfo, 2, STUB_sched_get_stackinfo)
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(sched_get_stackinfo, 2)
#ifdef CONFIG_SMP
SYSCALL_LOOKUP(sched_getaffinity, 3, STUB_sched_getaffinity)
SYSCALL_LOOKUP(sched_getcpu, 0, STUB_sched_getcpu)
SYSCALL_LOOKUP(sched_setaffinity, 3, STUB_sched_setaffinity)
SYSCALL_LOOKUP(sched_getaffinity, 3)
SYSCALL_LOOKUP(sched_getcpu, 0)
SYSCALL_LOOKUP(sched_setaffinity, 3)
#endif
SYSCALL_LOOKUP(set_errno, 1, STUB_set_errno)
SYSCALL_LOOKUP(uname, 1, STUB_uname)
SYSCALL_LOOKUP(sethostname, 2, STUB_sethostname)
SYSCALL_LOOKUP(set_errno, 1)
SYSCALL_LOOKUP(uname, 1)
SYSCALL_LOOKUP(sethostname, 2)
/* 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)
SYSCALL_LOOKUP(setuid, 1)
SYSCALL_LOOKUP(getuid, 0)
SYSCALL_LOOKUP(setgid, 1)
SYSCALL_LOOKUP(getgid, 0)
#endif
/* Semaphores */
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)
SYSCALL_LOOKUP(sem_destroy, 1)
SYSCALL_LOOKUP(sem_post, 1)
SYSCALL_LOOKUP(sem_timedwait, 2)
SYSCALL_LOOKUP(sem_trywait, 1)
SYSCALL_LOOKUP(sem_wait, 1)
#ifdef CONFIG_PRIORITY_INHERITANCE
SYSCALL_LOOKUP(sem_setprotocol, 2, STUB_sem_setprotocol)
SYSCALL_LOOKUP(sem_setprotocol, 2)
#endif
/* Named semaphores */
#ifdef CONFIG_FS_NAMED_SEMAPHORES
SYSCALL_LOOKUP(sem_open, 4, STUB_sem_open)
SYSCALL_LOOKUP(sem_close, 1, STUB_sem_close)
SYSCALL_LOOKUP(sem_unlink, 1, STUB_sem_unlink)
SYSCALL_LOOKUP(sem_open, 4)
SYSCALL_LOOKUP(sem_close, 1)
SYSCALL_LOOKUP(sem_unlink, 1)
#endif
#ifndef CONFIG_BUILD_KERNEL
SYSCALL_LOOKUP(task_create, 5, STUB_task_create)
SYSCALL_LOOKUP(task_create, 5)
#ifdef CONFIG_LIB_SYSCALL
SYSCALL_LOOKUP(nx_task_spawn, 1, STUB_nx_task_spawn)
SYSCALL_LOOKUP(nx_task_spawn, 1)
#endif
#else
SYSCALL_LOOKUP(pgalloc, 2, STUB_pgalloc)
SYSCALL_LOOKUP(pgalloc, 2)
#endif
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)
SYSCALL_LOOKUP(task_delete, 1)
SYSCALL_LOOKUP(task_restart, 1)
SYSCALL_LOOKUP(task_setcancelstate, 2)
SYSCALL_LOOKUP(up_assert, 2)
#ifdef CONFIG_CANCELLATION_POINTS
SYSCALL_LOOKUP(task_setcanceltype, 2, STUB_task_setcanceltype)
SYSCALL_LOOKUP(task_testcancel, 0, STUB_task_testcancel)
SYSCALL_LOOKUP(task_setcanceltype, 2)
SYSCALL_LOOKUP(task_testcancel, 0)
#endif
/* The following can be individually enabled */
#if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK)
SYSCALL_LOOKUP(vfork, 0, STUB_vfork)
SYSCALL_LOOKUP(vfork, 0)
#endif
#ifdef CONFIG_SCHED_ATEXIT
SYSCALL_LOOKUP(atexit, 1, STUB_atexit)
SYSCALL_LOOKUP(atexit, 1)
#endif
#ifdef CONFIG_SCHED_ONEXIT
SYSCALL_LOOKUP(on_exit, 2, STUB_on_exit)
SYSCALL_LOOKUP(on_exit, 2)
#endif
#ifdef CONFIG_SCHED_WAITPID
SYSCALL_LOOKUP(waitpid, 3, STUB_waitpid)
SYSCALL_LOOKUP(waitpid, 3)
#ifdef CONFIG_SCHED_HAVE_PARENT
SYSCALL_LOOKUP(wait, 1, STUB_wait)
SYSCALL_LOOKUP(waitid, 4, STUB_waitid)
SYSCALL_LOOKUP(wait, 1)
SYSCALL_LOOKUP(waitid, 4)
#endif
#endif
@ -124,9 +124,9 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
*/
#ifdef CONFIG_MODULE
SYSCALL_LOOKUP(insmod, 2, STUB_insmod)
SYSCALL_LOOKUP(rmmod, 1, STUB_rmmod)
SYSCALL_LOOKUP(modhandle, 1, STUB_modhandle)
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
@ -135,15 +135,15 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
#ifndef CONFIG_BINFMT_DISABLE
#ifndef CONFIG_BUILD_KERNEL
SYSCALL_LOOKUP(exec, 4, STUB_exec)
SYSCALL_LOOKUP(exec, 4)
#endif
#ifdef CONFIG_LIBC_EXECFUNCS
#ifdef CONFIG_LIB_ENVPATH
SYSCALL_LOOKUP(posix_spawnp, 6, STUB_posix_spawnp)
SYSCALL_LOOKUP(posix_spawnp, 6)
#else
SYSCALL_LOOKUP(posix_spawn, 6, STUB_posix_spawn)
SYSCALL_LOOKUP(posix_spawn, 6)
#endif
SYSCALL_LOOKUP(execv, 2, STUB_execv)
SYSCALL_LOOKUP(execv, 2)
#endif
#endif
@ -151,226 +151,226 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
* configuration.
*/
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)
SYSCALL_LOOKUP(clock_nanosleep, 4, STUB_clock_nanosleep)
SYSCALL_LOOKUP(kill, 2)
SYSCALL_LOOKUP(sigaction, 3)
SYSCALL_LOOKUP(sigpending, 1)
SYSCALL_LOOKUP(sigprocmask, 3)
SYSCALL_LOOKUP(sigqueue, 3)
SYSCALL_LOOKUP(sigsuspend, 1)
SYSCALL_LOOKUP(sigtimedwait, 3)
SYSCALL_LOOKUP(sigwaitinfo, 2)
SYSCALL_LOOKUP(clock_nanosleep, 4)
/* The following are only defined if the system clock is enabled in the
* NuttX configuration.
*/
SYSCALL_LOOKUP(clock, 0, STUB_clock)
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime)
SYSCALL_LOOKUP(clock, 0)
SYSCALL_LOOKUP(clock_getres, 2)
SYSCALL_LOOKUP(clock_gettime, 2)
SYSCALL_LOOKUP(clock_settime, 2)
#ifdef CONFIG_CLOCK_TIMEKEEPING
SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime)
SYSCALL_LOOKUP(adjtime, 2)
#endif
/* The following are defined only if POSIX timers are supported */
#ifndef CONFIG_DISABLE_POSIX_TIMERS
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)
SYSCALL_LOOKUP(getitimer, 2, STUB_getitimer)
SYSCALL_LOOKUP(setitimer, 3, STUB_setitimer)
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
/* System logging */
SYSCALL_LOOKUP(nx_vsyslog, 3, STUB_nx_vsyslog)
SYSCALL_LOOKUP(nx_vsyslog, 3)
/* The following are defined if either file or socket descriptor are
* enabled.
*/
SYSCALL_LOOKUP(close, 1, STUB_close)
SYSCALL_LOOKUP(ioctl, 3, STUB_ioctl)
SYSCALL_LOOKUP(read, 3, STUB_read)
SYSCALL_LOOKUP(write, 3, STUB_write)
SYSCALL_LOOKUP(pread, 4, STUB_pread)
SYSCALL_LOOKUP(pwrite, 4, STUB_pwrite)
SYSCALL_LOOKUP(close, 1)
SYSCALL_LOOKUP(ioctl, 3)
SYSCALL_LOOKUP(read, 3)
SYSCALL_LOOKUP(write, 3)
SYSCALL_LOOKUP(pread, 4)
SYSCALL_LOOKUP(pwrite, 4)
#ifdef CONFIG_FS_AIO
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)
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, STUB_poll)
SYSCALL_LOOKUP(select, 5, STUB_select)
SYSCALL_LOOKUP(ppoll, 4, STUB_ppoll)
SYSCALL_LOOKUP(pselect, 6, STUB_pselect)
SYSCALL_LOOKUP(poll, 3)
SYSCALL_LOOKUP(select, 5)
SYSCALL_LOOKUP(ppoll, 4)
SYSCALL_LOOKUP(pselect, 6)
#ifdef CONFIG_NETDEV_IFINDEX
SYSCALL_LOOKUP(if_indextoname, 2, STUB_if_indextoname)
SYSCALL_LOOKUP(if_nametoindex, 1, STUB_if_nametoindex)
SYSCALL_LOOKUP(if_indextoname, 2)
SYSCALL_LOOKUP(if_nametoindex, 1)
#endif
#ifdef CONFIG_SERIAL_TERMIOS
SYSCALL_LOOKUP(tcdrain, 1, STUB_tcdrain)
SYSCALL_LOOKUP(tcdrain, 1)
#endif
/* Board support */
#ifdef CONFIG_LIB_BOARDCTL
SYSCALL_LOOKUP(boardctl, 2, STUB_boardctl)
SYSCALL_LOOKUP(boardctl, 2)
#endif
/* The following are defined if file descriptors are enabled */
SYSCALL_LOOKUP(closedir, 1, STUB_closedir)
SYSCALL_LOOKUP(dup, 1, STUB_dup)
SYSCALL_LOOKUP(dup2, 2, STUB_dup2)
SYSCALL_LOOKUP(fcntl, 3, STUB_fcntl)
SYSCALL_LOOKUP(lseek, 3, STUB_lseek)
SYSCALL_LOOKUP(mmap, 6, STUB_mmap)
SYSCALL_LOOKUP(open, 3, STUB_open)
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)
SYSCALL_LOOKUP(closedir, 1)
SYSCALL_LOOKUP(dup, 1)
SYSCALL_LOOKUP(dup2, 2)
SYSCALL_LOOKUP(fcntl, 3)
SYSCALL_LOOKUP(lseek, 3)
SYSCALL_LOOKUP(mmap, 6)
SYSCALL_LOOKUP(open, 3)
SYSCALL_LOOKUP(opendir, 1)
SYSCALL_LOOKUP(readdir, 1)
SYSCALL_LOOKUP(rewinddir, 1)
SYSCALL_LOOKUP(seekdir, 2)
SYSCALL_LOOKUP(stat, 2)
SYSCALL_LOOKUP(fstat, 2)
SYSCALL_LOOKUP(statfs, 2)
SYSCALL_LOOKUP(fstatfs, 2)
SYSCALL_LOOKUP(telldir, 1)
#ifdef CONFIG_FS_RAMMAP
SYSCALL_LOOKUP(munmap, 2, STUB_munmap)
#if defined(CONFIG_FS_RAMMAP)
SYSCALL_LOOKUP(munmap, 2)
#endif
#ifdef CONFIG_PSEUDOFS_SOFTLINKS
SYSCALL_LOOKUP(link, 2, STUB_link)
SYSCALL_LOOKUP(readlink, 3, STUB_readlink)
#if defined(CONFIG_PSEUDOFS_SOFTLINKS)
SYSCALL_LOOKUP(link, 2)
SYSCALL_LOOKUP(readlink, 3)
#endif
#if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
SYSCALL_LOOKUP(nx_pipe, 2, STUB_nx_pipe)
SYSCALL_LOOKUP(nx_mkfifo, 3, STUB_nx_mkfifo)
SYSCALL_LOOKUP(nx_pipe, 2)
SYSCALL_LOOKUP(nx_mkfifo, 3)
#endif
#if CONFIG_NFILE_STREAMS > 0
SYSCALL_LOOKUP(fs_fdopen, 3, STUB_fs_fdopen)
SYSCALL_LOOKUP(sched_getstreams, 0, STUB_sched_getstreams)
SYSCALL_LOOKUP(fs_fdopen, 3)
SYSCALL_LOOKUP(sched_getstreams, 0)
#endif
#ifdef CONFIG_NET_SENDFILE
SYSCALL_LOOKUP(sendfile, 4, STUB_fs_sendifile)
SYSCALL_LOOKUP(sendfile, 4)
#endif
#ifndef CONFIG_DISABLE_MOUNTPOINT
SYSCALL_LOOKUP(mount, 5, STUB_mount)
SYSCALL_LOOKUP(fsync, 1, STUB_fsync)
SYSCALL_LOOKUP(ftruncate, 2, STUB_ftruncate)
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)
SYSCALL_LOOKUP(mount, 5)
SYSCALL_LOOKUP(fsync, 1)
SYSCALL_LOOKUP(ftruncate, 2)
SYSCALL_LOOKUP(mkdir, 2)
SYSCALL_LOOKUP(rename, 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, STUB_shmget)
SYSCALL_LOOKUP(shmat, 3, STUB_shmat)
SYSCALL_LOOKUP(shmctl, 3, STUB_shmctl)
SYSCALL_LOOKUP(shmdt, 1, STUB_shmdt)
SYSCALL_LOOKUP(shmget, 3)
SYSCALL_LOOKUP(shmat, 3)
SYSCALL_LOOKUP(shmctl, 3)
SYSCALL_LOOKUP(shmdt, 1)
#endif
/* The following are defined if pthreads are enabled */
#ifndef CONFIG_DISABLE_PTHREAD
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)
SYSCALL_LOOKUP(pthread_mutex_timedlock, 2, STUB_pthread_mutex_timedlock)
SYSCALL_LOOKUP(pthread_mutex_trylock, 1, STUB_pthread_mutex_trylock)
SYSCALL_LOOKUP(pthread_mutex_unlock, 1, STUB_pthread_mutex_unlock)
SYSCALL_LOOKUP(pthread_cancel, 1)
SYSCALL_LOOKUP(pthread_cond_broadcast, 1)
SYSCALL_LOOKUP(pthread_cond_signal, 1)
SYSCALL_LOOKUP(pthread_cond_wait, 2)
SYSCALL_LOOKUP(pthread_create, 4)
SYSCALL_LOOKUP(pthread_detach, 1)
SYSCALL_LOOKUP(pthread_exit, 1)
SYSCALL_LOOKUP(pthread_getschedparam, 3)
SYSCALL_LOOKUP(pthread_getspecific, 1)
SYSCALL_LOOKUP(pthread_join, 2)
SYSCALL_LOOKUP(pthread_key_create, 2)
SYSCALL_LOOKUP(pthread_key_delete, 1)
SYSCALL_LOOKUP(pthread_mutex_destroy, 1)
SYSCALL_LOOKUP(pthread_mutex_init, 2)
SYSCALL_LOOKUP(pthread_mutex_timedlock, 2)
SYSCALL_LOOKUP(pthread_mutex_trylock, 1)
SYSCALL_LOOKUP(pthread_mutex_unlock, 1)
#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE
SYSCALL_LOOKUP(pthread_mutex_consistent, 1, STUB_pthread_mutex_consistent)
SYSCALL_LOOKUP(pthread_mutex_consistent, 1)
#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)
SYSCALL_LOOKUP(pthread_setschedparam, 3)
SYSCALL_LOOKUP(pthread_setschedprio, 2)
SYSCALL_LOOKUP(pthread_setspecific, 2)
#ifdef CONFIG_SMP
SYSCALL_LOOKUP(pthread_setaffinity_np, 3, STUB_pthread_setaffinity_np)
SYSCALL_LOOKUP(pthread_getaffinity_np, 3, STUB_pthread_getaffinity_np)
SYSCALL_LOOKUP(pthread_setaffinity_np, 3)
SYSCALL_LOOKUP(pthread_getaffinity_np, 3)
#endif
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)
SYSCALL_LOOKUP(pthread_cond_timedwait, 3)
SYSCALL_LOOKUP(pthread_kill, 2)
SYSCALL_LOOKUP(pthread_sigmask, 3)
#ifdef CONFIG_PTHREAD_CLEANUP
SYSCALL_LOOKUP(pthread_cleanup_push, 2, STUB_pthread_cleanup_push)
SYSCALL_LOOKUP(pthread_cleanup_pop, 1, STUB_pthread_cleanup_pop)
SYSCALL_LOOKUP(pthread_cleanup_push, 2)
SYSCALL_LOOKUP(pthread_cleanup_pop, 1)
#endif
#endif
/* The following are defined only if message queues are enabled */
#ifndef CONFIG_DISABLE_MQUEUE
SYSCALL_LOOKUP(mq_close, 1, STUB_mq_close)
SYSCALL_LOOKUP(mq_getattr, 2, STUB_mq_getattr)
SYSCALL_LOOKUP(mq_notify, 2, STUB_mq_notify)
SYSCALL_LOOKUP(mq_open, 4, STUB_mq_open)
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)
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(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)
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(accept, 3, STUB_accept)
SYSCALL_LOOKUP(bind, 3, STUB_bind)
SYSCALL_LOOKUP(connect, 3, STUB_connect)
SYSCALL_LOOKUP(getpeername, 3, STUB_getpeername)
SYSCALL_LOOKUP(getsockname, 3, STUB_getsockname)
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)
SYSCALL_LOOKUP(accept, 3)
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(send, 4)
SYSCALL_LOOKUP(sendto, 6)
SYSCALL_LOOKUP(setsockopt, 5)
SYSCALL_LOOKUP(socket, 3)
#endif
/* The following is defined only if CONFIG_TASK_NAME_SIZE > 0 */
#if CONFIG_TASK_NAME_SIZE > 0
SYSCALL_LOOKUP(prctl, 2, STUB_prctl)
SYSCALL_LOOKUP(prctl, 2)
#endif
/* The following is defined only if entropy pool random number generator
@ -378,5 +378,5 @@ SYSCALL_LOOKUP(telldir, 1, STUB_telldir)
*/
#ifdef CONFIG_CRYPTO_RANDOM_POOL
SYSCALL_LOOKUP(getrandom, 2, STUB_getrandom)
SYSCALL_LOOKUP(getrandom, 2)
#endif

View file

@ -119,8 +119,8 @@
const uintptr_t g_funclookup[SYS_nsyscalls] =
{
# define SYSCALL_LOOKUP1(f,n,p) (uintptr_t)f
# define SYSCALL_LOOKUP(f,n,p) , (uintptr_t)f
# define SYSCALL_LOOKUP1(f,n) (uintptr_t)f
# define SYSCALL_LOOKUP(f,n) , (uintptr_t)f
# include <sys/syscall_lookup.h>
# undef SYSCALL_LOOKUP1
# undef SYSCALL_LOOKUP

View file

@ -53,8 +53,8 @@
const uint8_t g_funcnparms[SYS_nsyscalls] =
{
# define SYSCALL_LOOKUP1(f,n,p) n
# define SYSCALL_LOOKUP(f,n,p) , n
# define SYSCALL_LOOKUP1(f,n) n
# define SYSCALL_LOOKUP(f,n) , n
# include <sys/syscall_lookup.h>
# undef SYSCALL_LOOKUP1
# undef SYSCALL_LOOKUP

View file

@ -33,378 +33,46 @@
#if defined(CONFIG_LIB_SYSCALL)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define CAT(p,f) CAT_(p, f)
#define CAT_(p,f) p##f
#define STUB_NAME(f) CAT(STUB_, f)
#define STUB_PROT0(f) \
uintptr_t STUB_NAME(f)(int nbr)
#define STUB_PROT1(f) \
uintptr_t STUB_NAME(f)(int nbr, uintptr_t parm1)
#define STUB_PROT2(f) \
uintptr_t STUB_NAME(f)(int nbr, uintptr_t parm1, uintptr_t parm2)
#define STUB_PROT3(f) \
uintptr_t STUB_NAME(f)(int nbr, uintptr_t parm1, uintptr_t parm2, \
uintptr_t parm3)
#define STUB_PROT4(f) \
uintptr_t STUB_NAME(f)(int nbr, uintptr_t parm1, uintptr_t parm2, \
uintptr_t parm3, uintptr_t parm4)
#define STUB_PROT5(f) \
uintptr_t STUB_NAME(f)(int nbr, uintptr_t parm1, uintptr_t parm2, \
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5)
#define STUB_PROT6(f) \
uintptr_t STUB_NAME(f)(int nbr, uintptr_t parm1, uintptr_t parm2, \
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, \
uintptr_t parm6)
#define STUB_PROT(f, n) CAT(STUB_PROT, n)(f)
/****************************************************************************
* Stub Function Prototypes
****************************************************************************/
/* These first system calls are supported regardless of the NuttX
* configuration
*/
uintptr_t STUB__exit(int nbr, uintptr_t parm1);
uintptr_t STUB_exit(int nbr, uintptr_t parm1);
uintptr_t STUB_get_errno(int nbr);
uintptr_t STUB_getpid(int nbr);
uintptr_t STUB_sched_getparam(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sched_getscheduler(int nbr, uintptr_t parm1);
uintptr_t STUB_sched_lock(int nbr);
uintptr_t STUB_sched_lockcount(int nbr);
uintptr_t STUB_sched_rr_get_interval(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_sched_setparam(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sched_setscheduler(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_sched_unlock(int nbr);
uintptr_t STUB_sched_yield(int nbr);
uintptr_t STUB_sched_get_stackinfo(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_sched_getaffinity(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_sched_getcpu(int nbr);
uintptr_t STUB_sched_setaffinity(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_set_errno(int nbr, uintptr_t parm1);
uintptr_t STUB_uname(int nbr, uintptr_t parm1);
/* User identity */
uintptr_t STUB_setuid(int nbr, uintptr_t parm1);
uintptr_t STUB_getuid(int nbr);
uintptr_t STUB_setgid(int nbr, uintptr_t parm1);
uintptr_t STUB_getgid(int nbr);
/* Semaphores */
uintptr_t STUB_sem_close(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_destroy(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_open(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_sem_post(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_setprotocol(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sem_timedwait(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sem_trywait(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_unlink(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_wait(int nbr, uintptr_t parm1);
uintptr_t STUB_pgalloc(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_task_create(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_nx_task_spawn(int nbr, uintptr_t parm1);
uintptr_t STUB_task_delete(int nbr, uintptr_t parm1);
uintptr_t STUB_task_restart(int nbr, uintptr_t parm1);
uintptr_t STUB_task_setcancelstate(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_up_assert(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_task_setcanceltype(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_task_testcancel(int nbr);
/* The following can be individually enabled */
uintptr_t STUB_vfork(int nbr);
uintptr_t STUB_atexit(int nbr, uintptr_t parm1);
uintptr_t STUB_on_exit(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_waitpid(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_wait(int nbr, uintptr_t parm1);
uintptr_t STUB_waitid(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
/* The following can only be defined if we are configured to load
* OS modules from a file system.
*/
uintptr_t STUB_insmod(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_rmmod(int nbr, uintptr_t parm1);
uintptr_t STUB_modhandle(int nbr, uintptr_t parm1, uintptr_t parm2);
/* The following can only be defined if we are configured to execute
* programs from a file system.
*/
uintptr_t STUB_exec(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_posix_spawn(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t STUB_posix_spawnp(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t STUB_execv(int nbr, uintptr_t parm1, uintptr_t parm2);
/* The following are only defined is signals are supported in the NuttX
* configuration.
*/
uintptr_t STUB_kill(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sigaction(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_sigpending(int nbr, uintptr_t parm1);
uintptr_t STUB_sigprocmask(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_sigqueue(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_sigsuspend(int nbr, uintptr_t parm1);
uintptr_t STUB_sigtimedwait(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_sigwaitinfo(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_clock_nanosleep(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
/* The following are only defined if the system clock is enabled in the
* NuttX configuration.
*/
uintptr_t STUB_clock(int nbr);
uintptr_t STUB_clock_getres(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_clock_gettime(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_clock_settime(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_adjtime(int nbr, uintptr_t parm1, uintptr_t parm2);
/* The following are defined only if POSIX timers are supported */
uintptr_t STUB_timer_create(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_timer_delete(int nbr, uintptr_t parm1);
uintptr_t STUB_timer_getoverrun(int nbr, uintptr_t parm1);
uintptr_t STUB_timer_gettime(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_timer_settime(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_getitimer(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_setitimer(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
/* System logging */
uintptr_t STUB_nx_vsyslog(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
/* The following are defined if either file or socket descriptor are
* enabled.
*/
uintptr_t STUB_close(int nbr, uintptr_t parm1);
uintptr_t STUB_ioctl(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_read(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_write(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_pread(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_pwrite(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_poll(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_select(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_ppoll(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_pselect(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
/* Asynchronous I/O */
uintptr_t STUB_aio_read(int nbr, uintptr_t parm1);
uintptr_t STUB_aio_write(int nbr, uintptr_t parm1);
uintptr_t STUB_aio_fsync(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_aio_cancel(int nbr, uintptr_t parm1, uintptr_t parm2);
/* Network interface indices */
uintptr_t STUB_if_indextoname(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_if_nametoindex(int nbr, uintptr_t parm1);
/* Termios */
uintptr_t STUB_tcdrain(int nbr, uintptr_t parm1);
/* Board support */
uintptr_t STUB_boardctl(int nbr, uintptr_t parm1, uintptr_t parm2);
/* The following are defined if file descriptors are enabled */
uintptr_t STUB_closedir(int nbr, uintptr_t parm1);
uintptr_t STUB_dup(int nbr, uintptr_t parm1);
uintptr_t STUB_dup2(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_fcntl(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_lseek(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_mmap(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t STUB_munmap(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_open(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_opendir(int nbr, uintptr_t parm1);
uintptr_t STUB_readdir(int nbr, uintptr_t parm1);
uintptr_t STUB_rewinddir(int nbr, uintptr_t parm1);
uintptr_t STUB_seekdir(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_stat(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_fstat(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_statfs(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_fstatfs(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_telldir(int nbr, uintptr_t parm1);
uintptr_t STUB_link(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_readlink(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_nx_pipe(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_nx_mkfifo(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_fs_fdopen(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_sched_getstreams(int nbr);
ssize_t sendfile(int outfd, int infd, FAR off_t *offset, size_t count);
uintptr_t STUB_fsync(int nbr, uintptr_t parm1);
uintptr_t STUB_ftruncate(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_mkdir(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_mount(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_rename(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_rmdir(int nbr, uintptr_t parm1);
uintptr_t STUB_umount2(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_unlink(int nbr, uintptr_t parm1);
/* Shared memory interfaces */
uintptr_t STUB_shmget(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_shmat(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_shmctl(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_shmdt(int nbr, uintptr_t parm1);
/* The following are defined if pthreads are enabled */
uintptr_t STUB_pthread_cancel(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_cond_broadcast(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_cond_signal(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_cond_wait(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_pthread_create(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_pthread_detach(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_exit(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_getschedparam(int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3);
uintptr_t STUB_pthread_getspecific(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_join(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_pthread_key_create(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_pthread_key_delete(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_mutex_destroy(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_mutex_init(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_pthread_mutex_timedlock(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_pthread_mutex_trylock(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_mutex_unlock(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_mutex_consistent(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_setschedparam(int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3);
uintptr_t STUB_pthread_setschedprio(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_pthread_setspecific(int nbr, uintptr_t parm1,
uintptr_t parm2);
uintptr_t STUB_pthread_setaffinity_np(int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3);
uintptr_t STUB_pthread_getaffinity_np(int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3);
uintptr_t STUB_pthread_cond_timedwait(int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3);
uintptr_t STUB_pthread_kill(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_pthread_sigmask(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_pthread_cleanup_pop(int nbr, uintptr_t parm1);
uintptr_t STUB_pthread_cleanup_push(int nbr, uintptr_t parm1,
uintptr_t parm2);
/* The following are defined only if message queues are enabled */
uintptr_t STUB_mq_close(int nbr, uintptr_t parm1);
uintptr_t STUB_mq_getattr(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_mq_notify(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_mq_open(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_mq_receive(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_mq_send(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_mq_setattr(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_mq_timedreceive(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_mq_timedsend(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_mq_unlink(int nbr, uintptr_t parm1);
/* The following are defined only if environment variables are supported */
uintptr_t STUB_clearenv(int nbr);
uintptr_t STUB_getenv(int nbr, uintptr_t parm1);
uintptr_t STUB_putenv(int nbr, uintptr_t parm1);
uintptr_t STUB_setenv(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_unsetenv(int nbr, uintptr_t parm1);
/* The following are defined only if netb is supported */
uintptr_t STUB_sethostname(int nbr, uintptr_t parm1, uintptr_t parm2);
/* The following are defined only if networking AND sockets are supported */
uintptr_t STUB_accept(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_bind(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_connect(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_getpeername(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_getsockname(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_getsockopt(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_listen(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_recv(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_recvfrom(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t STUB_send(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_sendto(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t STUB_setsockopt(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_socket(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
/* The following is defined only if CONFIG_TASK_NAME_SIZE > 0 */
uintptr_t STUB_prctl(int nbr, uintptr_t parm1, uintptr_t parm2);
/* The following is defined only if entropy pool random number generator
* is enabled.
*/
uintptr_t STUB_getrandom(int nbr, uintptr_t parm1, uintptr_t parm2);
#define SYSCALL_LOOKUP1(f,n) STUB_PROT(f, n);
#define SYSCALL_LOOKUP(f,n) STUB_PROT(f, n);
#include <sys/syscall_lookup.h>
#undef SYSCALL_LOOKUP1
#undef SYSCALL_LOOKUP
/****************************************************************************
* Public Data
@ -417,8 +85,8 @@ uintptr_t STUB_getrandom(int nbr, uintptr_t parm1, uintptr_t parm2);
const uintptr_t g_stublookup[SYS_nsyscalls] =
{
# define SYSCALL_LOOKUP1(f,n,p) (uintptr_t)p
# define SYSCALL_LOOKUP(f,n,p) , (uintptr_t)p
# define SYSCALL_LOOKUP1(f,n) (uintptr_t)STUB_NAME(f)
# define SYSCALL_LOOKUP(f,n) , (uintptr_t)STUB_NAME(f)
# include <sys/syscall_lookup.h>
# undef SYSCALL_LOOKUP1
# undef SYSCALL_LOOKUP