Ananth Ananthanarayanan wrote:
>
> I sent that mail again to kaio@xxxxxxxxxxx, but
> still haven't received even my copy, so I'm
> trying to send it to you directly. Please
> let me know if you get this message.
>
> thanks,
>
> ananth.
>
> ------------------------------------------------------------------------
>
> Chris Smith's program to test KAIO & sockets brought
> out a problem in the interaction between KAIO code
> and socket code. In a way the problem is similar
> to the one already fixed in the PIPE code. This
> time, though, I think it should be OK to change
> the KAIO code that calls into the socket layer
> (also the same KAIO code that calls into PIPE).
>
> The chages are only a couple of lines of code, so
> I'm going to append it to the end of this message.
>
> Finally, noticed that the socket test was calling
> aio_return() without first checking aio_error(),
> whereas, aio_error() should be called first,
> and only when it returns 0 can aio_return be called.
> Note that till the I/O complete aio_error() can
> return EINPROGRESS, although in Chris' test aio_suspend
> precludes this possiblity.
Added the code for aio_error(). Thanks for pointing it out.
> Chris, can you let me know if you are able to apply
> the following fix & if it works for you?
I applied the 2 line change you sent (didn't try the patch but I assume
it's the same). It appears to work wonderfully.
--Chris
P.S.: I attached an updated version of the aio2.cpp code. 
|