diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-05 15:59:02 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-05 15:59:02 -0600 |
commit | 618022818272fe4d352438c9a5b49e9b98c41199 (patch) | |
tree | 92a5d8af460f0d062aa889e6041be9ca90b623de /nuttx | |
parent | 81cbb59cd0297bd06cc8ce8a9a79f5a38ce952bd (diff) | |
download | px4-nuttx-618022818272fe4d352438c9a5b49e9b98c41199.tar.gz px4-nuttx-618022818272fe4d352438c9a5b49e9b98c41199.tar.bz2 px4-nuttx-618022818272fe4d352438c9a5b49e9b98c41199.zip |
Add system calls for AIO kernel functions
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/include/sys/syscall.h | 17 | ||||
-rw-r--r-- | nuttx/syscall/syscall.csv | 4 | ||||
-rw-r--r-- | nuttx/syscall/syscall_lookup.h | 6 | ||||
-rw-r--r-- | nuttx/syscall/syscall_stublookup.c | 5 |
4 files changed, 28 insertions, 4 deletions
diff --git a/nuttx/include/sys/syscall.h b/nuttx/include/sys/syscall.h index 3003793b6..34b06b986 100644 --- a/nuttx/include/sys/syscall.h +++ b/nuttx/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) +# 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_poll (_SYS_descriptors+6) +# endif # ifndef CONFIG_DISABLE_POLL -# define SYS_poll (__SYS_descriptors+6) -# define SYS_select (__SYS_descriptors+7) -# define __SYS_filedesc (__SYS_descriptors+8) +# define SYS_poll __SYS_poll +# define SYS_select (__SYS_poll+1) +# define __SYS_filedesc (__SYS_poll+2) # else -# define __SYS_filedesc (__SYS_descriptors+6) +# define __SYS_filedesc __SYS_poll # endif #else # define __SYS_filedesc __SYS_descriptors diff --git a/nuttx/syscall/syscall.csv b/nuttx/syscall/syscall.csv index 15b058f83..1831c652c 100644 --- a/nuttx/syscall/syscall.csv +++ b/nuttx/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/nuttx/syscall/syscall_lookup.h b/nuttx/syscall/syscall_lookup.h index e45f3355c..1c640d0b3 100644 --- a/nuttx/syscall/syscall_lookup.h +++ b/nuttx/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/nuttx/syscall/syscall_stublookup.c b/nuttx/syscall/syscall_stublookup.c index 3c97d6c39..eb1e78629 100644 --- a/nuttx/syscall/syscall_stublookup.c +++ b/nuttx/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); |