From d5ab7846113004e7fa3aaf64691d3d170988c311 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Mon, 5 Aug 2013 22:58:02 +0400 Subject: [PATCH] runtime: remove singleproc var It was needed for the old scheduler, because there temporary could be more threads than gomaxprocs. In the new scheduler gomaxprocs is always respected. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12438043 --- src/pkg/runtime/mgc0.c | 6 +++--- src/pkg/runtime/proc.c | 2 -- src/pkg/runtime/runtime.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index f8da5457d8..be0f81879e 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -2347,7 +2347,7 @@ runtime·markallocated(void *v, uintptr n, bool noptr) bits = (obits & ~(bitMask<status = Pidle; pidleput(p); } - runtime·singleproc = new == 1; runtime·atomicstore((uint32*)&runtime·gomaxprocs, new); } diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 15520b57eb..951376a52f 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -700,7 +700,6 @@ extern M* runtime·allm; extern P** runtime·allp; extern int32 runtime·gomaxprocs; extern uint32 runtime·needextram; -extern bool runtime·singleproc; extern uint32 runtime·panicking; extern uint32 runtime·gcwaiting; // gc is waiting to run extern int8* runtime·goos; -- 2.48.1