Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.2

http://hackage.haskell.org/trac/ghc/changeset/a754466df6e9ebe1409ca23d48249d57960a6d37

>---------------------------------------------------------------

commit a754466df6e9ebe1409ca23d48249d57960a6d37
Author: Simon Marlow <[email protected]>
Date:   Thu Jul 21 14:29:58 2011 +0100

    need to release the SM lock around heapCensus() to avoid deadlock with
    +RTS -hT and -threaded.

>---------------------------------------------------------------

 rts/sm/GC.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 396992c..2b9ee9d 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -668,7 +668,9 @@ GarbageCollect (rtsBool force_major_gc,
   // behind.
   if (do_heap_census) {
       debugTrace(DEBUG_sched, "performing heap census");
+      RELEASE_SM_LOCK;
       heapCensus();
+      ACQUIRE_SM_LOCK;
   }
 
   // send exceptions to any threads which were about to die



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to