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