diff options
| author | Michael Pratt <mpratt@google.com> | 2025-05-14 15:53:58 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-05-19 12:46:19 -0700 |
| commit | 76e7bfbb4e3a6114a33c7dba666fdd26698bedc5 (patch) | |
| tree | a3c5738900dba5ff5e40f43ddda7dcb14b9ddae2 /src/runtime/proc.go | |
| parent | d93bea0e59e51c2d85e69f28f09726b5c9fc81d2 (diff) | |
| download | go-76e7bfbb4e3a6114a33c7dba666fdd26698bedc5.tar.xz | |
runtime: move atoi to internal/runtime/strconv
Moving to a smaller package allows its use in other internal/runtime
packages.
This isn't internal/strconvlite since it can't be used directly by
strconv.
For #73193.
Change-Id: I6a6a636c9c8b3f06b5fd6c07fe9dd5a7a37d1429
Reviewed-on: https://go-review.googlesource.com/c/go/+/672697
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 1ca800c5fd..5d3e4e4953 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -11,6 +11,7 @@ import ( "internal/goos" "internal/runtime/atomic" "internal/runtime/exithook" + "internal/runtime/strconv" "internal/runtime/sys" "internal/stringslite" "unsafe" @@ -900,7 +901,7 @@ func schedinit() { lock(&sched.lock) sched.lastpoll.Store(nanotime()) procs := ncpu - if n, ok := atoi32(gogetenv("GOMAXPROCS")); ok && n > 0 { + if n, ok := strconv.Atoi32(gogetenv("GOMAXPROCS")); ok && n > 0 { procs = n } if procresize(procs) != nil { |
