Initialize gc_thread.mut_spin to the 'acquired' state
authorPatrick Palka <patrick@parcs.ath.cx>
Sun, 29 Sep 2013 21:11:51 +0000 (17:11 -0400)
committerPatrick Palka <patrick@parcs.ath.cx>
Wed, 2 Oct 2013 17:46:09 +0000 (13:46 -0400)
rts/sm/GC.c

index 26a1764..b5d6f03 100644 (file)
@@ -801,6 +801,7 @@ new_gc_thread (nat n, gc_thread *t)
     initSpinLock(&t->gc_spin);
     initSpinLock(&t->mut_spin);
     ACQUIRE_SPIN_LOCK(&t->gc_spin);
+    ACQUIRE_SPIN_LOCK(&t->mut_spin);
     t->wakeup = GC_THREAD_INACTIVE;  // starts true, so we can wait for the
                           // thread to start up, see wakeup_gc_threads
 #endif