Go 1.24 included the spinbitmutex GOEXPERIMENT for several popular
architectures, based on their native support an atomic primitive (8-bit
exchange) that aided its efficient implementation.
Move towards making the new mutex implementation permanent, so it fully
replaces the two previous (sema- and futex-based "tristate")
implementations.
For #68578
Change-Id: I888a73959df42eb0ec53875309c446675af8f09d
Reviewed-on: https://go-review.googlesource.com/c/go/+/658455
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
regabiSupported = true
}
- var haveXchg8 bool
- switch goarch {
- case "386", "amd64", "arm", "arm64", "ppc64le", "ppc64":
- haveXchg8 = true
- }
+ haveThreads := goarch != "wasm"
// Older versions (anything before V16) of dsymutil don't handle
// the .debug_rnglists section in DWARF5. See
RegabiArgs: regabiSupported,
AliasTypeParams: true,
SwissMap: true,
- SpinbitMutex: haveXchg8,
+ SpinbitMutex: haveThreads,
SyncHashTrieMap: true,
Dwarf5: dwarf5Supported,
}