Commit 65000655 authored by Hector Chu's avatar Hector Chu Committed by Russ Cox

runtime: remove unnecessary locking

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4819051
parent 6fe82e6b
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment