]> Cypherpunks repositories - gostls13.git/commit
runtime: rename ncpu to numCPUStartup
authorMichael Pratt <mpratt@google.com>
Tue, 13 May 2025 17:12:47 +0000 (13:12 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 19 May 2025 19:47:30 +0000 (12:47 -0700)
commitdb956262ac4125693cffb517ea7aebf6ab04ec35
tree3c93816c3dc43f4e273c84f7eb0c3f5b8896ccbb
parent76e7bfbb4e3a6114a33c7dba666fdd26698bedc5
runtime: rename ncpu to numCPUStartup

ncpu is the total logical CPU count at startup. It is never updated. For
#73193, we will start using updated CPU counts for updated GOMAXPROCS,
making the ncpu name a bit ambiguous. Change to a less ambiguous name.

While we're at it, give the OS specific lookup functions a common name,
so it can be used outside of osinit later.

For #73193.

Change-Id: I6a6a636cf21cc60de36b211f3c374080849fc667
Reviewed-on: https://go-review.googlesource.com/c/go/+/672277
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
23 files changed:
src/runtime/debug.go
src/runtime/heapdump.go
src/runtime/lock_spinbit.go
src/runtime/mgc.go
src/runtime/os3_solaris.go
src/runtime/os_aix.go
src/runtime/os_darwin.go
src/runtime/os_dragonfly.go
src/runtime/os_freebsd.go
src/runtime/os_freebsd_arm.go
src/runtime/os_illumos.go
src/runtime/os_linux.go
src/runtime/os_netbsd.go
src/runtime/os_netbsd_arm.go
src/runtime/os_only_solaris.go
src/runtime/os_openbsd.go
src/runtime/os_openbsd_arm.go
src/runtime/os_plan9.go
src/runtime/os_wasm.go
src/runtime/os_windows.go
src/runtime/proc.go
src/runtime/runtime2.go
src/runtime/vgetrandom_linux.go