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>
}
func mutexContended(l *mutex) bool {
- return atomic.Loaduintptr(&l.key) > mutexLocked
+ return atomic.Loaduintptr(&l.key)&^mutexMMask != 0
}
func lock(l *mutex) {