> 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
_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to