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