[commit: ghc] master: Call busy_wait_nop() in the spin-wait loop in shutdown_gc_threads() (9c3c152)
git at git.haskell.org
git at git.haskell.org
Sat Nov 30 01:14:15 UTC 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9c3c1527860cda84b1395f6936937cd094fb7744/ghc
>---------------------------------------------------------------
commit 9c3c1527860cda84b1395f6936937cd094fb7744
Author: Patrick Palka <patrick at parcs.ath.cx>
Date: Fri Nov 29 20:01:27 2013 -0500
Call busy_wait_nop() in the spin-wait loop in shutdown_gc_threads()
>---------------------------------------------------------------
9c3c1527860cda84b1395f6936937cd094fb7744
rts/sm/GC.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 58698e9..8cae2c9 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
}
More information about the ghc-commits
mailing list