]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: let freezetheworld work even when gomaxprocs=1
authorKeith Randall <khr@golang.org>
Thu, 30 Apr 2015 21:56:35 +0000 (14:56 -0700)
committerKeith Randall <khr@golang.org>
Tue, 5 May 2015 15:11:10 +0000 (15:11 +0000)
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>
src/runtime/proc1.go

index 1c81b1252aec7399770abb4fd156c5699befee73..753a3a5058e8abd3b46b2e0d43990a75561e2bb6 100644 (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