summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2013-11-29 20:01:27 -0500
committerPatrick Palka <patrick@parcs.ath.cx>2013-11-29 20:13:25 -0500
commit9c3c1527860cda84b1395f6936937cd094fb7744 (patch)
treecaebbb99526032f1426fb4a1e8f1b84103babfbe /rts
parent2e3c6a53330de8ed9e1dcbc8ab43c9405a3a89be (diff)
downloadhaskell-9c3c1527860cda84b1395f6936937cd094fb7744.tar.gz
Call busy_wait_nop() in the spin-wait loop in shutdown_gc_threads()
Diffstat (limited to 'rts')
-rw-r--r--rts/sm/GC.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 58698e9db2..8cae2c9629 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -1182,7 +1182,10 @@ shutdown_gc_threads (nat me USED_IF_THREADS)
for (i=0; i < n_gc_threads; i++) {
if (i == me || gc_threads[i]->idle) continue;
- while (gc_threads[i]->wakeup != GC_THREAD_WAITING_TO_CONTINUE) { write_barrier(); }
+ while (gc_threads[i]->wakeup != GC_THREAD_WAITING_TO_CONTINUE) {
+ busy_wait_nop();
+ write_barrier();
+ }
}
#endif
}