From a762ea17ecb593d695601f0c1b4ea9fbd601c6cb Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 11 Oct 2023 14:09:20 -0700 Subject: [PATCH] runtime: don't use atomic store in noteclear on AIX In CL 163624 we added an atomic store in noteclear on AIX only. In the discussion on issue #63384 we think we figured out that the real problem was in the implementation of compare-and-swap on ppc64. That is fixed by CL 533118, so the atomic store is no longer required. For #30189 For #63384 Change-Id: I60f4f2fac75106f2bee51a8d9663259dcde2029c Reviewed-on: https://go-review.googlesource.com/c/go/+/534517 Auto-Submit: Ian Lance Taylor Reviewed-by: Michael Knyszek Reviewed-by: Joel Sing Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- src/runtime/lock_sema.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/runtime/lock_sema.go b/src/runtime/lock_sema.go index e15bbf79ae..9afba08b0b 100644 --- a/src/runtime/lock_sema.go +++ b/src/runtime/lock_sema.go @@ -130,13 +130,7 @@ func unlock2(l *mutex) { // One-time notifications. func noteclear(n *note) { - if GOOS == "aix" { - // On AIX, semaphores might not synchronize the memory in some - // rare cases. See issue #30189. - atomic.Storeuintptr(&n.key, 0) - } else { - n.key = 0 - } + n.key = 0 } func notewakeup(n *note) { -- 2.48.1