...
1
2
3
4
5
6
7 package atomic
8
9 import "unsafe"
10
11
12
13
14
15
16
17
18 func Load(ptr *uint32) uint32 {
19 return *ptr
20 }
21
22
23
24 func Loadp(ptr unsafe.Pointer) unsafe.Pointer {
25 return *(*unsafe.Pointer)(ptr)
26 }
27
28
29
30 func LoadAcq(ptr *uint32) uint32 {
31 return *ptr
32 }
33
34
35
36 func LoadAcquintptr(ptr *uintptr) uintptr {
37 return *ptr
38 }
39
40
41 func Xadd64(ptr *uint64, delta int64) uint64
42
43
44 func Xadduintptr(ptr *uintptr, delta uintptr) uintptr
45
46
47 func Xadd(ptr *uint32, delta int32) uint32
48
49
50 func Xchg64(ptr *uint64, new uint64) uint64
51
52
53 func Xchg(ptr *uint32, new uint32) uint32
54
55
56 func Xchguintptr(ptr *uintptr, new uintptr) uintptr
57
58
59 func Load64(ptr *uint64) uint64
60
61
62
63 func Load8(ptr *uint8) uint8 {
64 return *ptr
65 }
66
67
68 func And8(ptr *uint8, val uint8)
69
70
71 func Or8(ptr *uint8, val uint8)
72
73
74 func And(ptr *uint32, val uint32)
75
76
77 func Or(ptr *uint32, val uint32)
78
79
80 func And32(ptr *uint32, val uint32) uint32
81
82
83 func Or32(ptr *uint32, val uint32) uint32
84
85
86 func And64(ptr *uint64, val uint64) uint64
87
88
89 func Or64(ptr *uint64, val uint64) uint64
90
91
92 func Anduintptr(ptr *uintptr, val uintptr) uintptr
93
94
95 func Oruintptr(ptr *uintptr, val uintptr) uintptr
96
97
98
99
100 func Cas64(ptr *uint64, old, new uint64) bool
101
102
103 func CasRel(ptr *uint32, old, new uint32) bool
104
105
106 func Store(ptr *uint32, val uint32)
107
108
109 func Store8(ptr *uint8, val uint8)
110
111
112 func Store64(ptr *uint64, val uint64)
113
114
115 func StoreRel(ptr *uint32, val uint32)
116
117
118 func StoreReluintptr(ptr *uintptr, val uintptr)
119
120
121 func StorepNoWB(ptr unsafe.Pointer, val unsafe.Pointer)
122
View as plain text