diff --git a/src/runtime/lock_spinbit.go b/src/runtime/lock_spinbit.go index ba5268abdd..7b7bc651ad 100644 --- a/src/runtime/lock_spinbit.go +++ b/src/runtime/lock_spinbit.go @@ -143,7 +143,7 @@ func mutexPreferLowLatency(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) {