Files
nuttx/syscall/syscall.csv
T
YAMAMOTO Takashi 761ee81956 move readv/writev to the kernel
currently, nuttx implements readv/writev on the top of read/write.
while it might work for the simplest cases, it's broken by design.
for example, it's impossible to make it work correctly for files
which need to preserve data boundaries without allocating a single
contiguous buffer. (udp socket, some character devices, etc)

this change is a start of the migration to a better design.
that is, implement read/write on the top of readv/writev.

to avoid a single huge change, following things will NOT be done in
this commit:

* fix actual bugs caused by the original readv-based-on-read design.
  (cf. https://github.com/apache/nuttx/pull/12674)

* adapt filesystems/drivers to actually benefit from the new interface.
  (except a few trivial examples)

* eventually retire the old interface.

* retire read/write syscalls. implement them in libc instead.

* pread/pwrite/preadv/pwritev (except the introduction of struct uio,
  which is a preparation to back these variations with the new
  interface.)
2024-10-30 17:07:54 +08:00

18 KiB

1_assertassert.hvoidFAR const char *intFAR const char *FAR void *
2_exitunistd.hnoreturnint
3accept4sys/socket.hdefined(CONFIG_NET)intintFAR struct sockaddr *FAR socklen_t *int
4adjtimesys/time.hdefined(CONFIG_CLOCK_TIMEKEEPING)intFAR const struct timeval *FAR struct timeval *
5aio_cancelaio.hdefined(CONFIG_FS_AIO)intintFAR struct aiocb *
6aio_fsyncaio.hdefined(CONFIG_FS_AIO)intintFAR struct aiocb *
7aio_readaio.hdefined(CONFIG_FS_AIO)intFAR struct aiocb *
8aio_writeaio.hdefined(CONFIG_FS_AIO)intFAR struct aiocb *
9bindsys/socket.hdefined(CONFIG_NET)intintFAR const struct sockaddr *socklen_t
10boardctlsys/boardctl.hdefined(CONFIG_BOARDCTL)intunsigned intuintptr_t
11chmodsys/stat.hintFAR const char *mode_t
12chownunistd.hintFAR const char *uid_tgid_t
13clearenvstdlib.h!defined(CONFIG_DISABLE_ENVIRON)int
14clocktime.hclock_t
15clock_gettimetime.hintclockid_tFAR struct timespec *
16clock_nanosleeptime.hintclockid_tintFAR const struct timespec *FAR struct timespec *
17clock_settimetime.hintclockid_tconst struct timespec*
18closeunistd.hintint
19connectsys/socket.hdefined(CONFIG_NET)intintFAR const struct sockaddr *socklen_t
20dupunistd.hintint
21dup2unistd.hintintint
22epoll_create1sys/epoll.hintint
23epoll_ctlsys/epoll.hintintintintFAR struct epoll_event *
24epoll_waitsys/epoll.hintintFAR struct epoll_event *intint
25eventfdsys/eventfd.hdefined(CONFIG_EVENT_FD)intunsigned intint
26execnuttx/binfmt/binfmt.h!defined(CONFIG_BINFMT_DISABLE) && !defined(CONFIG_BUILD_KERNEL)intFAR const char *FAR char * const *FAR char * const *FAR const struct symtab_s *int
27execveunistd.h!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS)intFAR const char *FAR char * const []|FAR char * const *FAR char * const []|FAR char * const *
28fchmodsys/stat.hintintmode_t
29fchownunistd.hintintuid_tgid_t
30fcntlfcntl.hintintint...int
31fstatsys/stat.hintintFAR struct stat *
32fstatfssys/statfs.hintintFAR struct statfs *
33fsyncunistd.hintint
34ftruncateunistd.hintintoff_t
35futimenssys/stat.hintintconst struct timespec [2]|FAR const struct timespec *
36get_environ_ptrstdlib.h!defined(CONFIG_DISABLE_ENVIRON)FAR char **
37getegidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)gid_t
38getenvstdlib.h!defined(CONFIG_DISABLE_ENVIRON)FAR char *FAR const char *
39geteuidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)uid_t
40getgidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)gid_t
41gethostnameunistd.hintFAR char *size_t
42getitimersys/time.h!defined(CONFIG_DISABLE_POSIX_TIMERS)intintFAR struct itimerval *
43getpeernamesys/socket.hdefined(CONFIG_NET)intintFAR struct sockaddr *FAR socklen_t *
44getpidunistd.hpid_t
45getppidunistd.hdefined(CONFIG_SCHED_HAVE_PARENT)pid_t
46getsocknamesys/socket.hdefined(CONFIG_NET)intintFAR struct sockaddr *FAR socklen_t *
47getsockoptsys/socket.hdefined(CONFIG_NET)intintintintFAR void *FAR socklen_t *
48gettidunistd.hpid_t
49gettimeofdaysys/time.hintFAR struct timeval *FAR struct timezone *
50getuidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)uid_t
51inotify_add_watchsys/inotify.hdefined(CONFIG_FS_NOTIFY)intintFAR const char *uint32_t
52inotify_initsys/inotify.hdefined(CONFIG_FS_NOTIFY)int
53inotify_init1sys/inotify.hdefined(CONFIG_FS_NOTIFY)intint
54inotify_rm_watchsys/inotify.hdefined(CONFIG_FS_NOTIFY)intintint
55insmodnuttx/module.hdefined(CONFIG_MODULE)FAR void *FAR const char *FAR const char *
56ioctlsys/ioctl.hintintint...unsigned long
57killsignal.hintpid_tint
58lchmodsys/stat.hintFAR const char *mode_t
59lchownunistd.hintFAR const char *uid_tgid_t
60linkunistd.hdefined(CONFIG_PSEUDOFS_SOFTLINKS)intFAR const char *FAR const char *
61listensys/socket.hdefined(CONFIG_NET)intintint
62lseekunistd.hoff_tintoff_tint
63lstatsys/stat.hintFAR const char *FAR struct stat *
64lutimenssys/stat.hintFAR const char *const struct timespec [2]|FAR const struct timespec *
65mkdirsys/stat.h!defined(CONFIG_DISABLE_MOUNTPOINT)intFAR const char *mode_t
66mmapsys/mman.hFAR void *FAR void *size_tintintintoff_t
67modhandlenuttx/module.hdefined(CONFIG_MODULE)FAR void *FAR const char *
68mountsys/mount.h!defined(CONFIG_DISABLE_MOUNTPOINT)intFAR const char *FAR const char *FAR const char *unsigned longFAR const void *
69mq_closemqueue.h!defined(CONFIG_DISABLE_MQUEUE)intmqd_t
70mq_getattrmqueue.h!defined(CONFIG_DISABLE_MQUEUE)intmqd_tFAR struct mq_attr *
71mq_notifymqueue.h!defined(CONFIG_DISABLE_MQUEUE)intmqd_tFAR const struct sigevent *
72mq_openmqueue.h!defined(CONFIG_DISABLE_MQUEUE)mqd_tFAR const char *int...mode_tFAR struct mq_attr *
73mq_receivemqueue.h!defined(CONFIG_DISABLE_MQUEUE)ssize_tmqd_tFAR char *size_tFAR unsigned int *
74mq_sendmqueue.h!defined(CONFIG_DISABLE_MQUEUE)intmqd_tFAR const char *size_tunsigned int
75mq_setattrmqueue.h!defined(CONFIG_DISABLE_MQUEUE)intmqd_tFAR const struct mq_attr *FAR struct mq_attr *
76mq_timedreceivemqueue.h!defined(CONFIG_DISABLE_MQUEUE)ssize_tmqd_tFAR char *size_tFAR unsigned int *FAR const struct timespec *
77mq_timedsendmqueue.h!defined(CONFIG_DISABLE_MQUEUE)intmqd_tFAR const char *size_tunsigned intFAR const struct timespec *
78mq_unlinkmqueue.h!defined(CONFIG_DISABLE_MQUEUE)intFAR const char *
79msyncsys/mman.hintFAR void *size_tint
80munmapsys/mman.hintFAR void *size_t
81nanosleeptime.hintFAR const struct timespec *FAR struct timespec *
82nx_mkfifonuttx/fs/fs.hdefined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0intFAR const char *mode_tsize_t
83nx_pthread_createnuttx/pthread.h!defined(CONFIG_DISABLE_PTHREAD)intpthread_trampoline_tFAR pthread_t *FAR const pthread_attr_t *pthread_startroutine_tpthread_addr_t
84nx_pthread_exitnuttx/pthread.h!defined(CONFIG_DISABLE_PTHREAD)noreturnpthread_addr_t
85nx_vsyslognuttx/syslog/syslog.hintintFAR const IPTR char *FAR va_list *
86nxsched_get_stackinfonuttx/sched.hintpid_tFAR struct stackinfo_s *
87nxsem_clockwaitnuttx/semaphore.hintFAR sem_t *clockid_tFAR const struct timespec *
88nxsem_closenuttx/semaphore.hdefined(CONFIG_FS_NAMED_SEMAPHORES)intFAR sem_t *
89nxsem_destroynuttx/semaphore.hintFAR sem_t *
90nxsem_getprioceilingnuttx/semaphore.hdefined(CONFIG_PRIORITY_PROTECT)intFAR const sem_t *FAR int *
91nxsem_opennuttx/semaphore.hdefined(CONFIG_FS_NAMED_SEMAPHORES)intFAR sem_t **FAR const char *int...mode_tunsigned int
92nxsem_postnuttx/semaphore.hintFAR sem_t *
93nxsem_set_protocolnuttx/semaphore.hdefined(CONFIG_PRIORITY_INHERITANCE)intFAR sem_t *int
94nxsem_setprioceilingnuttx/semaphore.hdefined(CONFIG_PRIORITY_PROTECT)intFAR sem_t *intFAR int *
95nxsem_timedwaitnuttx/semaphore.hintFAR sem_t *FAR const struct timespec *
96nxsem_trywaitnuttx/semaphore.hintFAR sem_t *
97nxsem_unlinknuttx/semaphore.hdefined(CONFIG_FS_NAMED_SEMAPHORES)intFAR const char *
98nxsem_waitnuttx/semaphore.hintFAR sem_t *
99openfcntl.hintFAR const char *int...mode_t
100pgallocnuttx/arch.hdefined(CONFIG_BUILD_KERNEL)uintptr_tuintptr_tunsigned int
101pipe2unistd.hdefined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0intint [2]|FAR int *int
102pollpoll.hintFAR struct pollfd *nfds_tint
103posix_spawnspawn.h!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS)intFAR pid_t *FAR const char *FAR const posix_spawn_file_actions_t *FAR const posix_spawnattr_t *FAR char * const []|FAR char * const *FAR char * const []|FAR char * const *
104ppollpoll.hintFAR struct pollfd *nfds_tFAR const struct timespec *FAR const sigset_t *
105prctlsys/prctl.hintint...uintptr_tuintptr_t
106preadunistd.hssize_tintFAR void *size_toff_t
107pselectsys/select.hintintFAR fd_set *FAR fd_set *FAR fd_set *FAR const struct timespec *FAR const sigset_t *
108pthread_barrier_waitpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_barrier_t *
109pthread_cancelpthread.h!defined(CONFIG_DISABLE_PTHREAD)intpthread_t
110pthread_cond_broadcastpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_cond_t *
111pthread_cond_clockwaitpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_cond_t *FAR pthread_mutex_t *clockid_tFAR const struct timespec *
112pthread_cond_signalpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_cond_t *
113pthread_cond_waitpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_cond_t *FAR pthread_mutex_t *
114pthread_detachpthread.h!defined(CONFIG_DISABLE_PTHREAD)intpthread_t
115pthread_getaffinity_nppthread.h!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SMP)intpthread_tsize_tFAR cpu_set_t*
116pthread_getschedparampthread.h!defined(CONFIG_DISABLE_PTHREAD)intpthread_tFAR int *FAR struct sched_param *
117pthread_joinpthread.h!defined(CONFIG_DISABLE_PTHREAD)intpthread_tFAR pthread_addr_t *
118pthread_mutex_consistentpthread.h!defined(CONFIG_DISABLE_PTHREAD) && !defined(CONFIG_PTHREAD_MUTEX_UNSAFE)intFAR pthread_mutex_t *
119pthread_mutex_destroypthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_mutex_t *
120pthread_mutex_initpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_mutex_t *FAR const pthread_mutexattr_t *
121pthread_mutex_timedlockpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_mutex_t *FAR const struct timespec *
122pthread_mutex_trylockpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_mutex_t *
123pthread_mutex_unlockpthread.h!defined(CONFIG_DISABLE_PTHREAD)intFAR pthread_mutex_t *
124pthread_setaffinity_nppthread.h!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SMP)intpthread_tsize_tFAR const cpu_set_t *
125pthread_setschedparampthread.h!defined(CONFIG_DISABLE_PTHREAD)intpthread_tintFAR const struct sched_param *
126pthread_setschedpriopthread.h!defined(CONFIG_DISABLE_PTHREAD)intpthread_tint
127pthread_sigmaskpthread.h!defined(CONFIG_DISABLE_PTHREAD)intintFAR const sigset_t *FAR sigset_t *
128putenvstdlib.h!defined(CONFIG_DISABLE_ENVIRON)intFAR const char *
129pwriteunistd.hssize_tintFAR const void *size_toff_t
130readunistd.hssize_tintFAR void *size_t
131readvsys/uio.hssize_tintFAR const struct iovec *int
132readlinkunistd.hdefined(CONFIG_PSEUDOFS_SOFTLINKS)ssize_tFAR const char *FAR char *size_t
133recvsys/socket.hdefined(CONFIG_NET)ssize_tintFAR void *size_tint
134recvfromsys/socket.hdefined(CONFIG_NET)ssize_tintFAR void*size_tintFAR struct sockaddr*FAR socklen_t*
135recvmsgsys/socket.hdefined(CONFIG_NET)ssize_tintFAR struct msghdr *int
136renamestdio.hintFAR const char *FAR const char *
137rmdirunistd.h!defined(CONFIG_DISABLE_MOUNTPOINT)intFAR const char*
138rmmodnuttx/module.hdefined(CONFIG_MODULE)intFAR void *
139sched_backtracesched.hdefined(CONFIG_SCHED_BACKTRACE)intpid_tFAR void **intint
140sched_getaffinitysched.hdefined(CONFIG_SMP)intpid_tsize_tFAR cpu_set_t *
141sched_getcpusched.hint
142sched_getparamsched.hintpid_tFAR struct sched_param *
143sched_getschedulersched.hintpid_t
144sched_locksched.hint
145sched_lockcountsched.hint
146sched_rr_get_intervalsched.hintpid_tstruct timespec *
147sched_setaffinitysched.hdefined(CONFIG_SMP)intpid_tsize_tFAR const cpu_set_t*
148sched_setparamsched.hintpid_tconst struct sched_param *
149sched_setschedulersched.hintpid_tintconst struct sched_param *
150sched_unlocksched.hint
151sched_yieldsched.hint
152selectsys/select.hintintFAR fd_set *FAR fd_set *FAR fd_set *FAR struct timeval *
153sendsys/socket.hdefined(CONFIG_NET)ssize_tintFAR const void *size_tint
154sendfilesys/sendfile.hssize_tintintFAR off_t *size_t
155sendmsgsys/socket.hdefined(CONFIG_NET)ssize_tintFAR struct msghdr *int
156sendtosys/socket.hdefined(CONFIG_NET)ssize_tintFAR const void *size_tintFAR const struct sockaddr *socklen_t
157setegidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)intgid_t
158setenvstdlib.h!defined(CONFIG_DISABLE_ENVIRON)intFAR const char *FAR const char *int
159seteuidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)intuid_t
160setgidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)intgid_t
161sethostnameunistd.hintFAR const char *size_t
162setitimersys/time.h!defined(CONFIG_DISABLE_POSIX_TIMERS)intintFAR const struct itimerval *FAR struct itimerval *
163setsockoptsys/socket.hdefined(CONFIG_NET) && defined(CONFIG_NET_SOCKOPTS)intintintintFAR const void *socklen_t
164settimeofdaysys/time.hintFAR const struct timeval *FAR const struct timezone *
165setuidunistd.hdefined(CONFIG_SCHED_USER_IDENTITY)intuid_t
166shm_opensys/mman.hdefined(CONFIG_FS_SHMFS)intFAR const char *intmode_t
167shm_unlinksys/mman.hdefined(CONFIG_FS_SHMFS)intFAR const char *
168shmatsys/shm.hdefined(CONFIG_MM_SHM)FAR void *intFAR const void *int
169shmctlsys/shm.hdefined(CONFIG_MM_SHM)intintintFAR struct shmid_ds *
170shmdtsys/shm.hdefined(CONFIG_MM_SHM)intFAR const void *
171shmgetsys/shm.hdefined(CONFIG_MM_SHM)intkey_tsize_tint
172shutdownsys/socket.hdefined(CONFIG_NET)intintint
173sigactionsignal.hintintFAR const struct sigaction *FAR struct sigaction *
174signalsignal.h_sa_handler_tint_sa_handler_t
175signalfdsys/signalfd.hdefined(CONFIG_SIGNAL_FD)intintFAR const sigset_t *int
176sigpendingsignal.hintFAR sigset_t *
177sigprocmasksignal.hintintFAR const sigset_t *FAR sigset_t *
178sigqueuesignal.hintintintunion sigval|FAR void *|sival_ptr
179sigsuspendsignal.hintFAR const sigset_t *
180sigtimedwaitsignal.hintFAR const sigset_t *FAR struct siginfo *FAR const struct timespec *
181sigwaitinfosignal.hintFAR const sigset_t *FAR struct siginfo *
182socketsys/socket.hdefined(CONFIG_NET)intintintint
183socketpairsys/socket.hdefined(CONFIG_NET)intintintintint [2]|FAR int *
184statsys/stat.hintFAR const char *FAR struct stat *
185statfssys/statfs.hintFAR const char *FAR struct statfs *
186symlinkunistd.hdefined(CONFIG_PSEUDOFS_SOFTLINKS)intFAR const char *FAR const char *
187syncunistd.hvoid
188sysinfosys/sysinfo.hintFAR struct sysinfo *
189task_createsched.h!defined(CONFIG_BUILD_KERNEL)intFAR const char *intintmain_tFAR char * const []|FAR char * const *
190task_deletesched.h!defined(CONFIG_BUILD_KERNEL)intpid_t
191task_restartsched.h!defined(CONFIG_BUILD_KERNEL)intpid_t
192task_spawnnuttx/spawn.h!defined(CONFIG_BUILD_KERNEL)intFAR const char *main_tFAR const posix_spawn_file_actions_t *FAR const posix_spawnattr_t *FAR char * const []|FAR char * const *FAR char * const []|FAR char * const *
193tgkillsignal.hintpid_tpid_tint
194timetime.htime_tFAR time_t *
195timer_createtime.h!defined(CONFIG_DISABLE_POSIX_TIMERS)intclockid_tFAR struct sigevent *FAR timer_t *
196timer_deletetime.h!defined(CONFIG_DISABLE_POSIX_TIMERS)inttimer_t
197timer_getoverruntime.h!defined(CONFIG_DISABLE_POSIX_TIMERS)inttimer_t
198timer_gettimetime.h!defined(CONFIG_DISABLE_POSIX_TIMERS)inttimer_tFAR struct itimerspec *
199timer_settimetime.h!defined(CONFIG_DISABLE_POSIX_TIMERS)inttimer_tintFAR const struct itimerspec *FAR struct itimerspec *
200timerfd_createsys/timerfd.hdefined(CONFIG_TIMER_FD)intintint
201timerfd_gettimesys/timerfd.hdefined(CONFIG_TIMER_FD)intintFAR struct itimerspec *
202timerfd_settimesys/timerfd.hdefined(CONFIG_TIMER_FD)intintintFAR const struct itimerspec *FAR struct itimerspec *
203umount2sys/mount.h!defined(CONFIG_DISABLE_MOUNTPOINT)intFAR const char *unsigned int
204unlinkunistd.h!defined(CONFIG_DISABLE_MOUNTPOINT)intFAR const char *
205unsetenvstdlib.h!defined(CONFIG_DISABLE_ENVIRON)intFAR const char *
206up_forknuttx/arch.hdefined(CONFIG_ARCH_HAVE_FORK)pid_t
207utimenssys/stat.hintFAR const char *const struct timespec [2]|FAR const struct timespec *
208waitsys/wait.hdefined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)pid_tFAR int *
209waitidsys/wait.hdefined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)intidtype_tid_t FAR siginfo_t *int
210waitpidsys/wait.hdefined(CONFIG_SCHED_WAITPID)pid_tpid_tFAR int *int
211writeunistd.hssize_tintFAR const void *size_t
212writevsys/uio.hssize_tintFAR const struct iovec *int