runtime: fix test of when a mutex is contended

This is used only in tests that verify reports of runtime-internal mutex
contention.

For #66999
For #70602

Change-Id: I72cb1302d8ea0524f1182ec892f5c9a1923cddba
Reviewed-on: https://go-review.googlesource.com/c/go/+/667095
Reviewed-by: Michael Knyszek <mknyszek@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: Junyang Shao <shaojunyang@google.com>
This commit is contained in:
Rhys Hiltner 2025-04-08 11:34:56 -07:00 committed by Gopher Robot
parent 95611c0eb4
commit 7ce45a014c

View File

@ -143,7 +143,7 @@ func mutexPreferLowLatency(l *mutex) bool {
} }
func mutexContended(l *mutex) bool { func mutexContended(l *mutex) bool {
return atomic.Loaduintptr(&l.key) > mutexLocked return atomic.Loaduintptr(&l.key)&^mutexMMask != 0
} }
func lock(l *mutex) { func lock(l *mutex) {