runtime: Use runtime_m to get m value after call to runtime_mcall.

From-SVN: r204853
This commit is contained in:
Ian Lance Taylor 2013-11-15 17:20:25 +00:00
parent 78ec303685
commit 7c0f17db44
1 changed files with 4 additions and 1 deletions

View 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