On 27/02/13 16:17, Joey Adams wrote:
On Sun, Feb 24, 2013 at 3:40 PM, Gabor Greif <[email protected]
<mailto:[email protected]>> wrote:
Hi all,
from what I gathered so far no emission of write barriers is needed when
- running on a uniprocessor (-threaded or not)
- running on a multiprocessor sans having linked with -threaded.
On Windows, the non-threaded RTS does I/O with forked threads; see
rts/win32/IOManager.c and the async* functions in GHC.Conc.Windows. I
think this means that for Windows, we need those write barriers even for
non-threaded.
Windows does use multiple OS threads to do non-blocking I/O in the
non-threaded RTS. However, it doesn't run multiple Haskell threads in
parallel (the threaded RTS is needed for that), so Gabor's patch which
just affects the update code is fine.
If we did actually rely on the C write_barrier() macro for the Windows
I/O manager, then there could be a problem, but we don't. On the other
hand, it might be prudent to enable write_barrier() on Windows just in
case someone tries to use it in the non-threaded RTS in the future.
Cheers,
Simon
_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs