]> Cypherpunks repositories - gostls13.git/commit
misc/cgo/test: use __atomic intrinsics instead of __sync
authorIan Lance Taylor <iant@golang.org>
Thu, 5 Sep 2019 21:35:28 +0000 (14:35 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 6 Sep 2019 17:38:58 +0000 (17:38 +0000)
commitb4924870f4b8302aba051a506bb499fad99b464e
tree34a0741ded507b0780c2783b63ab45a539ea1390
parente3d3e115e878a70af06c09960a924c5d0fa2710c
misc/cgo/test: use __atomic intrinsics instead of __sync

GCC has supported the __atomic intrinsics since 4.7, and clang
supports them as well. They are better than the __sync intrinsics in
that they specify a memory model and, more importantly for our purposes,
they are reliably implemented either in the compiler or in libatomic.

Change-Id: I5e0036ea3300f65c28b1c3d1f3b93fb61c1cd646
Reviewed-on: https://go-review.googlesource.com/c/go/+/193603
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
misc/cgo/test/testx.go