Hello,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am also testing my aio support. The aio_write binding seems to work ok .. as well as aio_error, Aio_return is a problem child. I think I wrote a really simple binding. I always receive nbytes as 0. I have been staring at the code hoping to catch a stupid mistake. I put putStrLn&#39;s in the code. .....Here is the code ...<br>
<br>aioReturn :: AIOCB -&gt; IO (AIOCB, ByteCount)<br>aioReturn aiocb = do<br>&nbsp;&nbsp; allocaBytes (#const sizeof(struct aiocb)) $ \ p_aiocb -&gt; do<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; poke p_aiocb aiocb<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count &lt;- throwErrnoIfMinus1 &quot;aioReturn&quot; (c_aio_return&nbsp; p_aiocb)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aiocb &lt;- peek p_aiocb<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (aiocb, fromIntegral count)<br><br>foreign import ccall safe &quot;aio.h aio_return&quot;<br>&nbsp;&nbsp;&nbsp; c_aio_return :: Ptr AIOCB -&gt; IO CInt<br><br>Maybe someone can spot something that I haven&#39;t. <br>
<br>Thanks, Vasili<br>