Home | History | Annotate | Download | only in runtime
      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 // NO go:noescape annotation; see atomic_pointer.go.
     28 func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
     29 
     30 //go:noescape
     31 func xchguintptr(ptr *uintptr, new uintptr) uintptr
     32 
     33 //go:noescape
     34 func atomicload(ptr *uint32) uint32
     35 
     36 //go:noescape
     37 func atomicload64(ptr *uint64) uint64
     38 
     39 //go:noescape
     40 func atomicloadp(ptr unsafe.Pointer) unsafe.Pointer
     41 
     42 //go:noescape
     43 func atomicand8(ptr *uint8, val uint8)
     44 
     45 //go:noescape
     46 func atomicor8(ptr *uint8, val uint8)
     47 
     48 // NOTE: Do not add atomicxor8 (XOR is not idempotent).
     49 
     50 //go:noescape
     51 func cas64(ptr *uint64, old, new uint64) bool
     52 
     53 //go:noescape
     54 func atomicstore(ptr *uint32, val uint32)
     55 
     56 //go:noescape
     57 func atomicstore64(ptr *uint64, val uint64)
     58 
     59 // NO go:noescape annotation; see atomic_pointer.go.
     60 func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
     61