diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2013-11-29 20:01:27 -0500 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2013-11-29 20:13:25 -0500 |
commit | 9c3c1527860cda84b1395f6936937cd094fb7744 (patch) | |
tree | caebbb99526032f1426fb4a1e8f1b84103babfbe /rts | |
parent | 2e3c6a53330de8ed9e1dcbc8ab43c9405a3a89be (diff) | |
download | haskell-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.c | 5 |
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 } |