]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime: Use runtime_m to get m value after call to runtime_mcall.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 15 Nov 2013 17:20:25 +0000 (17:20 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 15 Nov 2013 17:20:25 +0000 (17:20 +0000)
From-SVN: r204853

libgo/runtime/proc.c

index 7011f14f8a5b61119df49beab746625fe49c9e5c..de2a54bfa5e0e0819a4d940ea3af65b30eb9a5fa 100644 (file)
@@ -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