github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/runtime/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 "github.com/shogo82148/std/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 //go:noescape 42 func Loadint32(ptr *int32) int32 43 44 //go:noescape 45 func Loadint64(ptr *int64) int64 46 47 //go:noescape 48 func Xaddint32(ptr *int32, delta int32) int32 49 50 //go:noescape 51 func Xaddint64(ptr *int64, delta int64) int64 52 53 //go:noescape 54 func Xchgint32(ptr *int32, new int32) int32 55 56 //go:noescape 57 func Xchgint64(ptr *int64, new int64) int64