]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: don't use atomic store in noteclear on AIX
authorIan Lance Taylor <iant@golang.org>
Wed, 11 Oct 2023 21:09:20 +0000 (14:09 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 12 Oct 2023 14:16:07 +0000 (14:16 +0000)
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 <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/runtime/lock_sema.go

index e15bbf79ae982924d504864a79a39d2a4c1a48e4..9afba08b0b243bcd597a8d215824b89054f949fb 100644 (file)
@@ -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) {