mirror of
https://github.com/golang/go
synced 2024-11-21 22:04:39 -07:00
runtime: remove unnecessary locking
R=rsc, dvyukov CC=golang-dev https://golang.org/cl/4819051
This commit is contained in:
parent
6fe82e6b96
commit
6500065543
@ -855,14 +855,11 @@ runtime·exitsyscall(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
schedlock();
|
|
||||||
|
|
||||||
// Tell scheduler to put g back on the run queue:
|
// Tell scheduler to put g back on the run queue:
|
||||||
// mostly equivalent to g->status = Grunning,
|
// mostly equivalent to g->status = Grunning,
|
||||||
// but keeps the garbage collector from thinking
|
// but keeps the garbage collector from thinking
|
||||||
// that g is running right now, which it's not.
|
// that g is running right now, which it's not.
|
||||||
g->readyonstop = 1;
|
g->readyonstop = 1;
|
||||||
schedunlock();
|
|
||||||
|
|
||||||
// All the cpus are taken.
|
// All the cpus are taken.
|
||||||
// The scheduler will ready g and put this m to sleep.
|
// The scheduler will ready g and put this m to sleep.
|
||||||
|
Loading…
Reference in New Issue
Block a user