1
0
mirror of https://github.com/golang/go synced 2024-11-24 21:00:09 -07:00

runtime: remove unnecessary locking

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4819051
This commit is contained in:
Hector Chu 2011-08-04 00:22:39 -04:00 committed by Russ Cox
parent 6fe82e6b96
commit 6500065543

View File

@ -855,14 +855,11 @@ runtime·exitsyscall(void)
return;
}
schedlock();
// Tell scheduler to put g back on the run queue:
// mostly equivalent to g->status = Grunning,
// but keeps the garbage collector from thinking
// that g is running right now, which it's not.
g->readyonstop = 1;
schedunlock();
// All the cpus are taken.
// The scheduler will ready g and put this m to sleep.