Tue Sep 9 06:32:23 PDT 2008 Simon Marlow <[EMAIL PROTECTED]>
* Fix race condition in wakeupThreadOnCapability() (#2574)
wakeupThreadOnCapbility() is used to signal another capability that
there is a thread waiting to be added to its run queue. It adds the
thread to the (locked) wakeup queue on the remote capability. In
order to do this, it has to modify the TSO's link field, which has a
write barrier. The write barrier might put the TSO on the mutable
list, and the bug was that it was using the mutable list of the
*target* capability, which we do not have exclusive access to. We
should be using the current Capabilty's mutable list in this case.
M ./rts/Capability.c -40 +23
M ./rts/Capability.h -5 +4
M ./rts/Schedule.c -3 +1
M ./rts/Schedule.h -5 +10
M ./rts/Threads.c -1 +1
View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20080909133223-12142-64930b20ab0a6ca645a610403af4d4a75810cd94.gz
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc