summaryrefslogtreecommitdiffstats
path: root/libgo/runtime
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-15 17:20:25 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-15 17:20:25 +0000
commit81bca7840d5d0f70207fd4b9e9667ffe89c3a9a2 (patch)
tree415fcd7d51408deb3732e1c1ad5a698ca638e4ef /libgo/runtime
parent52e95e58f33ea65b833e6626c99c3945d663f127 (diff)
downloadppe42-gcc-81bca7840d5d0f70207fd4b9e9667ffe89c3a9a2.tar.gz
ppe42-gcc-81bca7840d5d0f70207fd4b9e9667ffe89c3a9a2.zip
runtime: Use runtime_m to get m value after call to runtime_mcall.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204853 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime')
-rw-r--r--libgo/runtime/proc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 7011f14f8a5..de2a54bfa5e 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -1983,7 +1983,10 @@ runtime_exitsyscall(void)
#endif
gp->gcnext_sp = nil;
runtime_memclr(&gp->gcregs, sizeof gp->gcregs);
- m->p->syscalltick++;
+
+ // Don't refer to m again, we might be running on a different
+ // thread after returning from runtime_mcall.
+ runtime_m()->p->syscalltick++;
}
static bool
OpenPOWER on IntegriCloud