RE: The Errno Story
"Simon Marlow" <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.ffi,gmane.comp.lang.haskell.glasgow.bugs |
|---|---|
| Message-ID | <3429668D0E777A499EE74A7952C382D1948C7E@EUR-MSG-01.europe.corp.microsoft.com> |
> 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