[Haskell-cafe] carry "state" around ....

Galchin, Vasili vigalchin at gmail.com
Mon Jul 28 02:41:25 EDT 2008

Hi Brandon,

     So based on what you are saying I kind of need a Haskell AIO
"imperative"/monadic function that basically returns a handle that is
associated with this AIOCB chunk-of-memory .... This handle gets passed
around during an AIO I/O session?? Sorry for talking too "imperatively" ;^)
<<< smiley face ;^)


On Mon, Jul 28, 2008 at 1:09 AM, Brandon S. Allbery KF8NH <
allbery at ece.cmu.edu> wrote:

> On 2008 Jul 28, at 1:54, Galchin, Vasili wrote:
>    allocaBytes (#const sizeof(struct aiocb)) $ \ p_aiocb -> do
>       poke p_aiocb aiocb
> As I understand it, you can't do this;you must use the same aiocb
> throughout (that is, the same chunk of memory, not merely the same values;
> there is quite possibly a kernel mapping to it which you can't change or
> copy, or a pointer to the original aiocb is kept as internal state in the
> aio library so it can update the errno and result on the fly).
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
> system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
> electrical and computer engineering, carnegie mellon university    KF8NH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080728/e82bc90a/attachment.htm

More information about the Haskell-Cafe mailing list