aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/debug.go')
-rw-r--r--src/runtime/debug.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/debug.go b/src/runtime/debug.go
index 105b79cfef..3ecaac10bc 100644
--- a/src/runtime/debug.go
+++ b/src/runtime/debug.go
@@ -24,13 +24,13 @@ func GOMAXPROCS(n int) int {
semacquire(&worldsema, false)
gp := getg()
- gp.m.gcing = 1
+ gp.m.preemptoff = "GOMAXPROCS"
systemstack(stoptheworld)
// newprocs will be processed by starttheworld
newprocs = int32(n)
- gp.m.gcing = 0
+ gp.m.preemptoff = ""
semrelease(&worldsema)
systemstack(starttheworld)
return ret