]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - rt/aio.h
Update copyright notices with scripts/update-copyrights
[thirdparty/glibc.git] / rt / aio.h
index 12c8eeaf045b1f7e3015f01511fa45723b24e785..090ff05462e65a71e3de5f1933aae519ad2139ba 100644 (file)
--- a/rt/aio.h
+++ b/rt/aio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 /*
  * ISO/IEC 9945-1:1996 6.7: Asynchronous Input and Output
 #define _AIO_H 1
 
 #include <features.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <time.h>
 #include <sys/types.h>
+#define __need_sigevent_t
+#include <bits/siginfo.h>
+#define __need_timespec
+#include <time.h>
 
 __BEGIN_DECLS
 
@@ -54,7 +54,7 @@ struct aiocb
 #else
   __off64_t aio_offset;                /* File offset.  */
 #endif
-  char __unused[32];
+  char __glibc_reserved[32];
 };
 
 /* The same for the 64bit offsets.  Please note that the members aio_fildes
@@ -77,7 +77,7 @@ struct aiocb64
   __ssize_t __return_value;
 
   __off64_t aio_offset;                /* File offset.  */
-  char __unused[32];
+  char __glibc_reserved[32];
 };
 #endif
 
@@ -136,25 +136,26 @@ enum
 
 /* Allow user to specify optimization.  */
 #ifdef __USE_GNU
-extern void aio_init (__const struct aioinit *__init) __THROW;
+extern void aio_init (const struct aioinit *__init) __THROW __nonnull ((1));
 #endif
 
 
 #ifndef __USE_FILE_OFFSET64
 /* Enqueue read request for given number of bytes and the given priority.  */
-extern int aio_read (struct aiocb *__aiocbp) __THROW;
+extern int aio_read (struct aiocb *__aiocbp) __THROW __nonnull ((1));
 /* Enqueue write request for given number of bytes and the given priority.  */
-extern int aio_write (struct aiocb *__aiocbp) __THROW;
+extern int aio_write (struct aiocb *__aiocbp) __THROW __nonnull ((1));
 
 /* Initiate list of I/O requests.  */
 extern int lio_listio (int __mode,
-                      struct aiocb *__const __list[__restrict_arr],
-                      int __nent, struct sigevent *__restrict __sig) __THROW;
+                      struct aiocb *const __list[__restrict_arr],
+                      int __nent, struct sigevent *__restrict __sig)
+  __THROW __nonnull ((2));
 
 /* Retrieve error status associated with AIOCBP.  */
-extern int aio_error (__const struct aiocb *__aiocbp) __THROW;
+extern int aio_error (const struct aiocb *__aiocbp) __THROW __nonnull ((1));
 /* Return status associated with AIOCBP.  */
-extern __ssize_t aio_return (struct aiocb *__aiocbp) __THROW;
+extern __ssize_t aio_return (struct aiocb *__aiocbp) __THROW __nonnull ((1));
 
 /* Try to cancel asynchronous I/O requests outstanding against file
    descriptor FILDES.  */
@@ -165,42 +166,44 @@ extern int aio_cancel (int __fildes, struct aiocb *__aiocbp) __THROW;
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
-extern int aio_suspend (__const struct aiocb *__const __list[], int __nent,
-                       __const struct timespec *__restrict __timeout);
+extern int aio_suspend (const struct aiocb *const __list[], int __nent,
+                       const struct timespec *__restrict __timeout)
+  __nonnull ((1));
 
 /* Force all operations associated with file desriptor described by
    `aio_fildes' member of AIOCBP.  */
-extern int aio_fsync (int __operation, struct aiocb *__aiocbp) __THROW;
+extern int aio_fsync (int __operation, struct aiocb *__aiocbp)
+  __THROW __nonnull ((2));
 #else
-# ifdef __REDIRECT
-extern int __REDIRECT (aio_read, (struct aiocb *__aiocbp) __THROW, aio_read64);
-extern int __REDIRECT (aio_write, (struct aiocb *__aiocbp) __THROW,
-                      aio_write64);
-
-extern int __REDIRECT (lio_listio,
-                      (int __mode,
-                       struct aiocb *__const __list[__restrict_arr],
-                       int __nent, struct sigevent *__restrict __sig) __THROW,
-                      lio_listio64);
-
-extern int __REDIRECT (aio_error, (__const struct aiocb *__aiocbp) __THROW,
-                      aio_error64);
-extern __ssize_t __REDIRECT (aio_return, (struct aiocb *__aiocbp) __THROW,
-                            aio_return64);
-
-extern int __REDIRECT (aio_cancel,
-                      (int __fildes, struct aiocb *__aiocbp) __THROW,
-                      aio_cancel64);
-
-extern int __REDIRECT (aio_suspend,
-                      (__const struct aiocb *__const __list[],
-                       int __nent,
-                       __const struct timespec *__restrict __timeout) __THROW,
-                      aio_suspend64);
-
-extern int __REDIRECT (aio_fsync,
-                      (int __operation, struct aiocb *__aiocbp) __THROW,
-                      aio_fsync64);
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (aio_read, (struct aiocb *__aiocbp), aio_read64)
+  __nonnull ((1));
+extern int __REDIRECT_NTH (aio_write, (struct aiocb *__aiocbp), aio_write64)
+  __nonnull ((1));
+
+extern int __REDIRECT_NTH (lio_listio,
+                          (int __mode,
+                           struct aiocb *const __list[__restrict_arr],
+                           int __nent, struct sigevent *__restrict __sig),
+                          lio_listio64) __nonnull ((2));
+
+extern int __REDIRECT_NTH (aio_error, (const struct aiocb *__aiocbp),
+                          aio_error64) __nonnull ((1));
+extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
+                                aio_return64) __nonnull ((1));
+
+extern int __REDIRECT_NTH (aio_cancel,
+                          (int __fildes, struct aiocb *__aiocbp),
+                          aio_cancel64);
+
+extern int __REDIRECT_NTH (aio_suspend,
+                          (const struct aiocb *const __list[], int __nent,
+                           const struct timespec *__restrict __timeout),
+                          aio_suspend64) __nonnull ((1));
+
+extern int __REDIRECT_NTH (aio_fsync,
+                          (int __operation, struct aiocb *__aiocbp),
+                          aio_fsync64) __nonnull ((2));
 
 # else
 #  define aio_read aio_read64
@@ -215,24 +218,27 @@ extern int __REDIRECT (aio_fsync,
 #endif
 
 #ifdef __USE_LARGEFILE64
-extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW;
-extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW;
+extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1));
+extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1));
 
 extern int lio_listio64 (int __mode,
-                        struct aiocb64 *__const __list[__restrict_arr],
+                        struct aiocb64 *const __list[__restrict_arr],
                         int __nent, struct sigevent *__restrict __sig)
-     __THROW;
+  __THROW __nonnull ((2));
 
-extern int aio_error64 (__const struct aiocb64 *__aiocbp) __THROW;
-extern __ssize_t aio_return64 (struct aiocb64 *__aiocbp) __THROW;
+extern int aio_error64 (const struct aiocb64 *__aiocbp)
+  __THROW __nonnull ((1));
+extern __ssize_t aio_return64 (struct aiocb64 *__aiocbp)
+  __THROW __nonnull ((1));
 
 extern int aio_cancel64 (int __fildes, struct aiocb64 *__aiocbp) __THROW;
 
-extern int aio_suspend64 (__const struct aiocb64 *__const __list[], int __nent,
-                         __const struct timespec *__restrict __timeout)
-     __THROW;
+extern int aio_suspend64 (const struct aiocb64 *const __list[], int __nent,
+                         const struct timespec *__restrict __timeout)
+  __THROW __nonnull ((1));
 
-extern int aio_fsync64 (int __operation, struct aiocb64 *__aiocbp) __THROW;
+extern int aio_fsync64 (int __operation, struct aiocb64 *__aiocbp)
+  __THROW __nonnull ((2));
 #endif
 
 __END_DECLS