From eeaae40d0c99bddc8c014685285ffeaee0c110e2 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Oct 2014 08:53:13 -0600 Subject: [PATCH] Initial implementation of aio_fsync() --- include/aio.h | 2 +- libc/aio/Make.defs | 4 ++-- libc/aio/aio_cancel.c | 2 ++ libc/aio/aio_error.c | 2 +- libc/aio/aio_read.c | 2 ++ libc/aio/aio_return.c | 2 +- libc/aio/aio_suspend.c | 2 +- libc/aio/aio_write.c | 2 ++ 8 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/aio.h b/include/aio.h index 937ea79ce2..c0c4af1f6f 100644 --- a/include/aio.h +++ b/include/aio.h @@ -164,7 +164,7 @@ extern "C" int aio_cancel(int fildes, FAR struct aiocb *aiocbp); int aio_error(FAR const struct aiocb *aiocbp); -int aio_fsync(int, FAR struct aiocb *aiocbp); +int aio_fsync(int op, FAR struct aiocb *aiocbp); int aio_read(FAR struct aiocb *aiocbp); ssize_t aio_return(FAR struct aiocb *aiocbp); int aio_suspend(FAR const struct aiocb *const list[], int nent, diff --git a/libc/aio/Make.defs b/libc/aio/Make.defs index bdce9f0449..9df5d1f574 100644 --- a/libc/aio/Make.defs +++ b/libc/aio/Make.defs @@ -37,8 +37,8 @@ ifeq ($(CONFIG_LIBC_AIO),y) # Add the asynchronous I/O C files to the build -CSRCS += aio_cancel.c aio_error.c aio_read.c aio_return.c aio_signal.c -CSRCS += aio_suspend.c aio_write.c +CSRCS += aio_cancel.c aio_error.c aio_fsync.c aio_read.c aio_return.c +CSRCS += aio_signal.c aio_suspend.c aio_write.c ifneq ($(CONFIG_PTHREAD_DISABLE),y) CSRCS += lio_listio.c diff --git a/libc/aio/aio_cancel.c b/libc/aio/aio_cancel.c index 90b46aa680..41c2811ab9 100644 --- a/libc/aio/aio_cancel.c +++ b/libc/aio/aio_cancel.c @@ -43,6 +43,8 @@ #include #include +#include + #ifndef CONFIG_LIBC_AIO /**************************************************************************** diff --git a/libc/aio/aio_error.c b/libc/aio/aio_error.c index 8b8f70f6a8..70dd024b92 100644 --- a/libc/aio/aio_error.c +++ b/libc/aio/aio_error.c @@ -71,7 +71,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: aio_read + * Name: aio_error * * Description: * The aio_error() function returns the error status associated with the diff --git a/libc/aio/aio_read.c b/libc/aio/aio_read.c index 366b7cb055..bb15d7dac6 100644 --- a/libc/aio/aio_read.c +++ b/libc/aio/aio_read.c @@ -45,6 +45,8 @@ #include #include +#include + #include "lib_internal.h" #include "aio/aio.h" diff --git a/libc/aio/aio_return.c b/libc/aio/aio_return.c index d26c80f47b..3aab715fc6 100644 --- a/libc/aio/aio_return.c +++ b/libc/aio/aio_return.c @@ -71,7 +71,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: aio_read + * Name: aio_return * * Description: * The aio_return() function returns the return status associated with diff --git a/libc/aio/aio_suspend.c b/libc/aio/aio_suspend.c index 625d597f84..4683ab24ad 100644 --- a/libc/aio/aio_suspend.c +++ b/libc/aio/aio_suspend.c @@ -72,7 +72,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: aio_read + * Name: aio_suspend * * Description: * The aio_suspend() function suspends the calling thread until at least diff --git a/libc/aio/aio_write.c b/libc/aio/aio_write.c index 84372c27d9..7b17e7a422 100644 --- a/libc/aio/aio_write.c +++ b/libc/aio/aio_write.c @@ -45,6 +45,8 @@ #include #include +#include + #include "lib_internal.h" #include "aio/aio.h"