github.com/sean-/go@v0.0.0-20151219100004-97f854cd7bb6/src/runtime/internal/atomic/stubs.go (about)

     1  // Copyright 2015 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  package atomic
     6  
     7  import "unsafe"
     8  
     9  //go:noescape
    10  func Cas(ptr *uint32, old, new uint32) bool
    11  
    12  // NO go:noescape annotation; see atomic_pointer.go.
    13  func Casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
    14  
    15  func nop() // call to prevent inlining of function body
    16  
    17  //go:noescape
    18  func Casuintptr(ptr *uintptr, old, new uintptr) bool
    19  
    20  //go:noescape
    21  func Storeuintptr(ptr *uintptr, new uintptr)
    22  
    23  //go:noescape
    24  func Loaduintptr(ptr *uintptr) uintptr
    25  
    26  //go:noescape
    27  func Loaduint(ptr *uint) uint
    28  
    29  // TODO(matloob): Should these functions have the go:noescape annotation?
    30  
    31  //go:noescape
    32  func Loadint64(ptr *int64) int64
    33  
    34  //go:noescape
    35  func Xaddint64(ptr *int64, delta int64) int64