Hello,<br><br> 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's in the code. .....Here is the code ...<br>
<br>aioReturn :: AIOCB -> IO (AIOCB, ByteCount)<br>aioReturn aiocb = do<br> allocaBytes (#const sizeof(struct aiocb)) $ \ p_aiocb -> do<br> poke p_aiocb aiocb<br> count <- throwErrnoIfMinus1 "aioReturn" (c_aio_return p_aiocb)<br>
aiocb <- peek p_aiocb<br> return (aiocb, fromIntegral count)<br><br>foreign import ccall safe "aio.h aio_return"<br> c_aio_return :: Ptr AIOCB -> IO CInt<br><br>Maybe someone can spot something that I haven't. <br>
<br>Thanks, Vasili<br>