1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:54:40 -07:00

runtime: let freezetheworld work even when gomaxprocs=1

Freezetheworld still has stuff to do when gomaxprocs=1.
In particular, signals can come in on other Ms (like the GC M, say)
and the single user M is still running.

Fixes #10546

Change-Id: I2f07f17d1c81e93cf905df2cb087112d436ca7e7
Reviewed-on: https://go-review.googlesource.com/9551
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This commit is contained in:
Keith Randall 2015-04-30 14:56:35 -07:00
parent 055ecb7be5
commit 5a828cfcde

View File

@ -216,9 +216,6 @@ const freezeStopWait = 0x7fffffff
// There is no reverse operation, used during crashing.
// This function must not lock any mutexes.
func freezetheworld() {
if gomaxprocs == 1 {
return
}
// stopwait and preemption requests can be lost
// due to races with concurrently executing threads,
// so try several times