diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 3003793b6c..34b06b9864 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -234,12 +234,21 @@ # define SYS_write (__SYS_descriptors+3) # define SYS_pread (__SYS_descriptors+4) # define SYS_pwrite (__SYS_descriptors+5) -# ifndef CONFIG_DISABLE_POLL -# define SYS_poll (__SYS_descriptors+6) -# define SYS_select (__SYS_descriptors+7) -# define __SYS_filedesc (__SYS_descriptors+8) +# ifdef CONFIG_FS_AIO +# define SYS_aio_read (_SYS_descriptors+6) +# define SYS_aio_write (_SYS_descriptors+7) +# define SYS_aio_fsync (_SYS_descriptors+8) +# define SYS_aio_cancel (_SYS_descriptors+9) +# define __SYS_poll (_SYS_descriptors+10) # else -# define __SYS_filedesc (__SYS_descriptors+6) +# define __SYS_poll (_SYS_descriptors+6) +# endif +# ifndef CONFIG_DISABLE_POLL +# define SYS_poll __SYS_poll +# define SYS_select (__SYS_poll+1) +# define __SYS_filedesc (__SYS_poll+2) +# else +# define __SYS_filedesc __SYS_poll # endif #else # define __SYS_filedesc __SYS_descriptors diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 15b058f83d..1831c652cd 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -1,4 +1,8 @@ "_exit","unistd.h","","void","int" +"aio_cancel","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *" +"aio_fsync","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *" +"aio_read","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *" +"aio_write","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *" "accept","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","struct sockaddr*","socklen_t*" "atexit","stdlib.h","defined(CONFIG_SCHED_ATEXIT)","int","void (*)(void)" "bind","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","FAR const struct sockaddr*","socklen_t" diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index e45f3355c1..1c640d0b39 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -165,6 +165,12 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) SYSCALL_LOOKUP(write, 3, STUB_write) SYSCALL_LOOKUP(pread, 4, STUB_pread) SYSCALL_LOOKUP(pwrite, 4, STUB_pwrite) +# ifdef CONFIG_FS_AIO + SYSCALL_LOOKUP(aio_read, 1, SYS_aio_read) + SYSCALL_LOOKUP(aio_write, 1, SYS_aio_write) + SYSCALL_LOOKUP(aio_fsync, 2, SYS_aio_fsync) + SYSCALL_LOOKUP(aio_cancel, 2, SYS_aio_cancel) +# endif # ifndef CONFIG_DISABLE_POLL SYSCALL_LOOKUP(poll, 3, STUB_poll) SYSCALL_LOOKUP(select, 5, STUB_select) diff --git a/syscall/syscall_stublookup.c b/syscall/syscall_stublookup.c index 3c97d6c396..eb1e78629b 100644 --- a/syscall/syscall_stublookup.c +++ b/syscall/syscall_stublookup.c @@ -173,6 +173,11 @@ uintptr_t STUB_poll(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t STUB_select(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5); +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 parm1); +uintptr_t STUB_aio_cancel(int nbr, uintptr_t parm1, uintptr_t parm1); + /* The following are defined if file descriptors are enabled */ uintptr_t STUB_closedir(int nbr, uintptr_t parm1);