From ebbf2b7fbdcda80d158b72276786a4a1dcad664a Mon Sep 17 00:00:00 2001 From: Haibo Xu Date: Thu, 29 Aug 2019 10:10:26 +0000 Subject: Enable pkg/atomicbitops support on arm64. Signed-off-by: Haibo Xu Change-Id: I1646aaa6f07b5ec31c39c318b70f48693fe59a7c --- pkg/atomicbitops/atomic_bitops.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/atomicbitops/atomic_bitops.go') diff --git a/pkg/atomicbitops/atomic_bitops.go b/pkg/atomicbitops/atomic_bitops.go index 63aa2b7f1..fcc41a9ea 100644 --- a/pkg/atomicbitops/atomic_bitops.go +++ b/pkg/atomicbitops/atomic_bitops.go @@ -12,11 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build amd64 +// +build amd64 arm64 // Package atomicbitops provides basic bitwise operations in an atomic way. // The implementation on amd64 leverages the LOCK prefix directly instead of -// relying on the generic cas primitives. +// relying on the generic cas primitives, and the arm64 leverages the LDAXR +// and STLXR pair primitives. // // WARNING: the bitwise ops provided in this package doesn't imply any memory // ordering. Using them to construct locks must employ proper memory barriers. -- cgit v1.2.3