This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: understanding unexpected aio_write() behaviour
Hello,
On Thu, May 21, 2009 at 12:37 AM, Leon Woestenberg
<leon.woestenberg@gmail.com> wrote:
> I have got a problem to understand aio_write() behaviour of a small
> test program, source below.
>
> ?int rc;
> ?rc = aio_write(&aio_cb);
> ?assert(rc == 0);
> ?rc = aio_write(&aio_cb2);
> ?assert(rc == 0);
>
> ?rc = aio_fsync(O_SYNC, &aio_cb);
Solved, I shouldn't re-use 'aio_cb' for fsync while write is still in-flight.
Regards,
--
Leon