aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorRhys Hiltner <rhys.hiltner@gmail.com>2025-03-14 12:38:34 -0700
committerGopher Robot <gobot@golang.org>2025-04-22 10:00:26 -0700
commit7a177114df3e26f4362378e907a869c4fbbf38b7 (patch)
treeca0b576cd709f8d8b879b75eafd537ba7c756735 /src/runtime/runtime2.go
parent7ce45a014c52375d6a3da577828c9f035a72857a (diff)
downloadgo-7a177114df3e26f4362378e907a869c4fbbf38b7.tar.xz
runtime: commit to spinbitmutex GOEXPERIMENT
Use the "spinbit" mutex implementation always (including on platforms that need to emulate atomic.Xchg8), and delete the prior "tristate" implementations. The exception is GOARCH=wasm, where the Go runtime does not use multiple threads. For #68578 Change-Id: Ifc29bbfa05071d776c23a19ae185891a03a82417 Reviewed-on: https://go-review.googlesource.com/c/go/+/658456 Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 27d14b890b..f7371c450b 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -8,7 +8,6 @@ import (
"internal/abi"
"internal/chacha8rand"
"internal/goarch"
- "internal/goexperiment"
"internal/runtime/atomic"
"internal/runtime/sys"
"unsafe"
@@ -628,9 +627,9 @@ type mPadded struct {
// Size the runtime.m structure so it fits in the 2048-byte size class, and
// not in the next-smallest (1792-byte) size class. That leaves the 11 low
- // bits of muintptr values available for flags, as required for
- // GOEXPERIMENT=spinbitmutex.
- _ [goexperiment.SpinbitMutexInt * (2048 - mallocHeaderSize - mRedZoneSize - unsafe.Sizeof(m{}))]byte
+ // bits of muintptr values available for flags, as required by
+ // lock_spinbit.go.
+ _ [(1 - goarch.IsWasm) * (2048 - mallocHeaderSize - mRedZoneSize - unsafe.Sizeof(m{}))]byte
}
type p struct {