This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problems with Asynchronous I/O and glibc-2.1.2 - FW: [Fwd: IPC and glibc?]


>>>>> Lawrence Chen, P Eng writes:

 > I'm having a problem with Asynchronous I/O and glibc-2.1.2.
 > The application I'm porting used to work with glibc-2.1.1 (except that I had to
 > code around the fact that aio_read and aio_write gave the wrong return values).

Are you using the 64bit interface? Or just the normal 32bit interface?

I just fixed a number of problems in the 64bit functions - they were
completly broken.  A patch is appended (you need to recompile glibc).

If you're using the normal 32bit interface, we do need a test program
to check this ourselves.  Otherwise there's no way we can help.

Andreas


============================================================
Index: rt/aio.h
--- rt/aio.h	1998/12/04 20:54:31	1.8
+++ rt/aio.h	1999/12/17 12:34:19
@@ -57,7 +57,8 @@
   char __unused[32];
 };
 
-/* The same for the 64bit offsets.  */
+/* The same for the 64bit offsets.  Please note that the members aio_fildes
+   to __return_value have to be the same in aiocb and aiocb64.  */
 #ifdef __USE_LARGEFILE64
 struct aiocb64
 {
@@ -69,6 +70,7 @@
   struct sigevent aio_sigevent;	/* Signal number and value.  */
 
   /* Internal members.  */
+  struct aiocb *__next_prio;
   int __abs_prio;
   int __policy;
   int __error_code;
@@ -172,7 +174,7 @@
 
 extern int __REDIRECT (lio_listio,
 		       __P ((int __mode,
-			     struct aiocb *__const __restrict __list[],
+			     struct aiocb *__const __list[],
 			     int __nent, struct sigevent *__restrict __sig)),
 		       lio_listio64);
 
@@ -186,13 +188,13 @@
 		       aio_cancel64);
 
 extern int __REDIRECT (aio_suspend,
-		       __P ((__const struct aiocb *__const __restrict __list[],
+		       __P ((__const struct aiocb *__const __list[],
 			     int __nent,
 			     __const struct timespec *__restrict __timeout)),
 		       aio_suspend64);
 
-extern int __REDIRECT (aio_fsync __P ((int __operation,
-				       struct aiocb *__aiocbp)),
+extern int __REDIRECT (aio_fsync, __P ((int __operation,
+					struct aiocb *__aiocbp)),
 		       aio_fsync64);
 
 # else


-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]