The Errno Story
Simon Marlow
simonmar at microsoft.com
Fri Jul 25 04:42:58 EDT 2003
> I therefore propose that we make the RTS save & restore the value of
> errno in the TSO, thus making errno "Haskell-Thread-Local-State", and
> solving all of the above problems.
Actually this has been on my ToDo list for a long time, I just never got
around to doing it (it has been mentioned on the FFI list before, IIRC).
> I also propose adding a note to the FFI spec (or the bound threads
> document, I'm not sure which is the right place) that says that
> implementations have to make sure that "Errno" is local to each
> *Haskell* thread.
Not the FFI spec - it assumes a single-threaded Haskell implementation.
The right place is the bound threads doc, and eventually the Concurrent
Haskell addendum.
Cheers,
Simon
More information about the FFI
mailing list