github.com/hlts2/go@v0.0.0-20170904000733-812b34efaed8/src/runtime/internal/atomic/atomic_ppc64x.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build ppc64 ppc64le 6 7 package atomic 8 9 import "unsafe" 10 11 //go:noescape 12 func Xadd(ptr *uint32, delta int32) uint32 13 14 //go:noescape 15 func Xadd64(ptr *uint64, delta int64) uint64 16 17 //go:noescape 18 func Xadduintptr(ptr *uintptr, delta uintptr) uintptr 19 20 //go:noescape 21 func Xchg(ptr *uint32, new uint32) uint32 22 23 //go:noescape 24 func Xchg64(ptr *uint64, new uint64) uint64 25 26 //go:noescape 27 func Xchguintptr(ptr *uintptr, new uintptr) uintptr 28 29 //go:noescape 30 func Load(ptr *uint32) uint32 31 32 //go:noescape 33 func Load64(ptr *uint64) uint64 34 35 //go:noescape 36 func Loadp(ptr unsafe.Pointer) unsafe.Pointer 37 38 //go:noescape 39 func And8(ptr *uint8, val uint8) 40 41 //go:noescape 42 func Or8(ptr *uint8, val uint8) 43 44 // NOTE: Do not add atomicxor8 (XOR is not idempotent). 45 46 //go:noescape 47 func Cas64(ptr *uint64, old, new uint64) bool 48 49 //go:noescape 50 func Store(ptr *uint32, val uint32) 51 52 //go:noescape 53 func Store64(ptr *uint64, val uint64) 54 55 // NO go:noescape annotation; see atomic_pointer.go. 56 func StorepNoWB(ptr unsafe.Pointer, val unsafe.Pointer)