From: sof Date: Sat, 13 Apr 2002 05:16:25 +0000 (+0000) Subject: [project @ 2002-04-13 05:16:25 by sof] X-Git-Tag: Approx_11550_changesets_converted~2155 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a24b09c73594fd757a749ba2ce8338162a2d70b6;p=ghc-hetmet.git [project @ 2002-04-13 05:16:25 by sof] GarbageCollect(): thread resurrection now assumes sched_mutex is held --- diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 0b236bf..8dbe589 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.132 2002/03/12 11:50:02 simonmar Exp $ + * $Id: GC.c,v 1.133 2002/04/13 05:16:25 sof Exp $ * * (c) The GHC Team 1998-1999 * @@ -985,17 +985,16 @@ GarbageCollect ( void (*get_roots)(evac_fn), rtsBool force_major_gc ) // Reset the nursery resetNurseries(); - // let go of lock (so that it can be re-grabbed below). RELEASE_LOCK(&sched_mutex); // start any pending finalizers scheduleFinalizers(old_weak_ptr_list); - // send exceptions to any threads which were about to die - resurrectThreads(resurrected_threads); - ACQUIRE_LOCK(&sched_mutex); + // send exceptions to any threads which were about to die + resurrectThreads(resurrected_threads); + // Update the stable pointer hash table. updateStablePtrTable(major_gc);