projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a30f73
)
Fix #3320: we forgot to save/restore the GC register variable
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 10 Sep 2009 15:16:23 +0000
(15:16 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 10 Sep 2009 15:16:23 +0000
(15:16 +0000)
rts/sm/GC.c
patch
|
blob
|
history
diff --git
a/rts/sm/GC.c
b/rts/sm/GC.c
index
d2217b8
..
febede6
100644
(file)
--- a/
rts/sm/GC.c
+++ b/
rts/sm/GC.c
@@
-1066,6
+1066,11
@@
loop:
void
gcWorkerThread (Capability *cap)
{
+ gc_thread *saved_gct;
+
+ // necessary if we stole a callee-saves register for gct:
+ saved_gct = gct;
+
cap->in_gc = rtsTrue;
gct = gc_threads[cap->no];
@@
-1105,6
+1110,8
@@
gcWorkerThread (Capability *cap)
gct->thread_index);
ACQUIRE_SPIN_LOCK(&gct->mut_spin);
debugTrace(DEBUG_gc, "GC thread %d on my way...", gct->thread_index);
+
+ SET_GCT(saved_gct);
}
#endif