github.com/alash3al/go@v0.0.0-20150827002835-d497eeb00540/src/runtime/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 runtime 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 //go:linkname xadduintptr runtime.xadd64 19 func xadduintptr(ptr *uintptr, delta uintptr) uintptr 20 21 //go:noescape 22 func xchg(ptr *uint32, new uint32) uint32 23 24 //go:noescape 25 func xchg64(ptr *uint64, new uint64) uint64 26 27 //go:noescape 28 func xchguintptr(ptr *uintptr, new uintptr) uintptr 29 30 //go:noescape 31 func atomicload(ptr *uint32) uint32 32 33 //go:noescape 34 func atomicload64(ptr *uint64) uint64 35 36 //go:noescape 37 func atomicloadp(ptr unsafe.Pointer) unsafe.Pointer 38 39 //go:noescape 40 func atomicand8(ptr *uint8, val uint8) 41 42 //go:noescape 43 func atomicor8(ptr *uint8, val uint8) 44 45 // NOTE: Do not add atomicxor8 (XOR is not idempotent). 46 47 //go:noescape 48 func cas64(ptr *uint64, old, new uint64) bool 49 50 //go:noescape 51 func atomicstore(ptr *uint32, val uint32) 52 53 //go:noescape 54 func atomicstore64(ptr *uint64, val uint64) 55 56 // NO go:noescape annotation; see atomic_pointer.go. 57 func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)