hello,

   
    Following is more of a criticism of Linux implementation of the Posix real-time extension of asynchronous I/O.... if not interesting please skip. The central data structure for Posix AIO is an aiocb. In any case, the Linux implementors added to the aiocb:

/* Asynchronous I/O control block.  */
struct aiocb
{
  int aio_fildes;               /* File desriptor.  */
  int aio_lio_opcode;           /* Operation to be performed.  */
  int aio_reqprio;              /* Request priority offset.  */
  volatile void *aio_buf;       /* Location of buffer.  */
  size_t aio_nbytes;            /* Length of transfer.  */
  struct sigevent aio_sigevent; /* Signal number and value.  */

  /* Internal members.  */     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  struct aiocb *__next_prio;
  int __abs_prio;
  int __policy;
  int __error_code;
  __ssize_t __return_value;

#ifndef __USE_FILE_OFFSET64
  __off_t aio_offset;           /* File offset.  */
  char __pad[sizeof (__off64_t) - sizeof (__off_t)];
#else
  __off64_t aio_offset;         /* File offset.  */
#endif
  char __unused[32];
};

My viewpoint is that the above "Internal members" must be "carried" around in a Haskell program. Am I correct?? If I am correct, then the Linux implementation of Posix AIO is not portable to say Solaris? In hindsight, if I am correct, it seems that the Linux implementation of AIO should use the ordered pair (pid, fd) to reference the "internal" members and leave the "aiocb" "clean"?

Very kind regards, Vasili