Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/internal/atomic/stubs.go

Documentation: runtime/internal/atomic

     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  //go:build !wasm
     6  // +build !wasm
     7  
     8  package atomic
     9  
    10  import "unsafe"
    11  
    12  //go:noescape
    13  func Cas(ptr *uint32, old, new uint32) bool
    14  
    15  // NO go:noescape annotation; see atomic_pointer.go.
    16  func Casp1(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool
    17  
    18  //go:noescape
    19  func Casint32(ptr *int32, old, new int32) bool
    20  
    21  //go:noescape
    22  func Casint64(ptr *int64, old, new int64) bool
    23  
    24  //go:noescape
    25  func Casuintptr(ptr *uintptr, old, new uintptr) bool
    26  
    27  //go:noescape
    28  func Storeint32(ptr *int32, new int32)
    29  
    30  //go:noescape
    31  func Storeint64(ptr *int64, new int64)
    32  
    33  //go:noescape
    34  func Storeuintptr(ptr *uintptr, new uintptr)
    35  
    36  //go:noescape
    37  func Loaduintptr(ptr *uintptr) uintptr
    38  
    39  //go:noescape
    40  func Loaduint(ptr *uint) uint
    41  
    42  // TODO(matloob): Should these functions have the go:noescape annotation?
    43  
    44  //go:noescape
    45  func Loadint32(ptr *int32) int32
    46  
    47  //go:noescape
    48  func Loadint64(ptr *int64) int64
    49  
    50  //go:noescape
    51  func Xaddint32(ptr *int32, delta int32) int32
    52  
    53  //go:noescape
    54  func Xaddint64(ptr *int64, delta int64) int64
    55  
    56  //go:noescape
    57  func Xchgint32(ptr *int32, new int32) int32
    58  
    59  //go:noescape
    60  func Xchgint64(ptr *int64, new int64) int64
    61  

View as plain text