2013-03-06 20:56:32 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* syscall/syscall_funclookup.c
|
|
|
|
*
|
2020-05-08 20:02:42 +02: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-05-08 20:02:42 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2013-03-06 20:56:32 +01:00
|
|
|
*
|
2020-05-08 20:02:42 +02: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
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <syscall.h>
|
|
|
|
|
|
|
|
/* The content of this file is only meaningful during the kernel phase of
|
|
|
|
* a kernel build.
|
|
|
|
*/
|
|
|
|
|
2014-08-28 22:52:14 +02:00
|
|
|
#if defined(CONFIG_LIB_SYSCALL) && defined(__KERNEL__)
|
2013-03-06 20:56:32 +01:00
|
|
|
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <nuttx/arch.h>
|
|
|
|
#include <nuttx/module.h>
|
|
|
|
#include <nuttx/sched.h>
|
|
|
|
#include <nuttx/semaphore.h>
|
|
|
|
#include <nuttx/spawn.h>
|
2020-05-08 20:02:42 +02:00
|
|
|
#include <nuttx/tls.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <nuttx/syslog/syslog.h>
|
2020-05-08 20:02:42 +02:00
|
|
|
#include <nuttx/binfmt/binfmt.h>
|
|
|
|
#include <nuttx/drivers/drivers.h>
|
|
|
|
#include <nuttx/fs/fs.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
|
|
|
|
#include <sys/boardctl.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <sys/mman.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <sys/mount.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
#include <sys/prctl.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <sys/random.h>
|
|
|
|
#include <sys/select.h>
|
|
|
|
#include <sys/sendfile.h>
|
|
|
|
#include <sys/shm.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
#include <sys/socket.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/statfs.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/utsname.h>
|
|
|
|
#include <sys/wait.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <aio.h>
|
|
|
|
#include <assert.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
#include <dirent.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <mqueue.h>
|
|
|
|
#include <net/if.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
#include <poll.h>
|
|
|
|
#include <pthread.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <sched.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
#include <semaphore.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <spawn.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2017-10-06 18:55:36 +02:00
|
|
|
#include <termios.h>
|
2020-05-06 11:24:42 +02:00
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
2013-03-06 20:56:32 +01:00
|
|
|
|
2020-05-07 08:42:52 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
2013-03-06 20:56:32 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Data
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Function lookup tables. This table is indexed by the system call numbers
|
|
|
|
* defined above. Given the system call number, this table provides the
|
|
|
|
* address of the corresponding system function.
|
|
|
|
*
|
|
|
|
* This table is only available during the kernel phase of a kernel build.
|
|
|
|
*/
|
|
|
|
|
|
|
|
const uintptr_t g_funclookup[SYS_nsyscalls] =
|
|
|
|
{
|
2020-05-06 06:20:26 +02:00
|
|
|
# define SYSCALL_LOOKUP1(f,n) (uintptr_t)f
|
|
|
|
# define SYSCALL_LOOKUP(f,n) , (uintptr_t)f
|
2020-05-07 08:42:52 +02:00
|
|
|
# include <sys/syscall_lookup.h>
|
|
|
|
# undef SYSCALL_LOOKUP1
|
|
|
|
# undef SYSCALL_LOOKUP
|
2013-03-06 20:56:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Functions
|
|
|
|
****************************************************************************/
|
|
|
|
|
2014-08-28 22:52:14 +02:00
|
|
|
#endif /* CONFIG_LIB_SYSCALL && __KERNEL__ */
|