Source file
test/fixedbugs/issue16241.go
1
2
3
4
5
6
7 package foo
8
9 import "sync/atomic"
10
11 func AddInt32(x *int32) {
12 atomic.AddInt32(x, 42)
13 }
14 func AddUint32(x *uint32) {
15 atomic.AddUint32(x, 42)
16 }
17 func AddUintptr(x *uintptr) {
18 atomic.AddUintptr(x, 42)
19 }
20
21 func AndInt32(x *int32) {
22 atomic.AndInt32(x, 42)
23 }
24 func AndUint32(x *uint32) {
25 atomic.AndUint32(x, 42)
26 }
27 func AndUintptr(x *uintptr) {
28 atomic.AndUintptr(x, 42)
29 }
30
31 func CompareAndSwapInt32(x *int32) {
32 atomic.CompareAndSwapInt32(x, 42, 42)
33 }
34 func CompareAndSwapUint32(x *uint32) {
35 atomic.CompareAndSwapUint32(x, 42, 42)
36 }
37 func CompareAndSwapUintptr(x *uintptr) {
38 atomic.CompareAndSwapUintptr(x, 42, 42)
39 }
40
41 func LoadInt32(x *int32) {
42 atomic.LoadInt32(x)
43 }
44 func LoadUint32(x *uint32) {
45 atomic.LoadUint32(x)
46 }
47 func LoadUintptr(x *uintptr) {
48 atomic.LoadUintptr(x)
49 }
50
51 func OrInt32(x *int32) {
52 atomic.OrInt32(x, 42)
53 }
54 func OrUint32(x *uint32) {
55 atomic.OrUint32(x, 42)
56 }
57 func OrUintptr(x *uintptr) {
58 atomic.OrUintptr(x, 42)
59 }
60
61 func StoreInt32(x *int32) {
62 atomic.StoreInt32(x, 42)
63 }
64 func StoreUint32(x *uint32) {
65 atomic.StoreUint32(x, 42)
66 }
67 func StoreUintptr(x *uintptr) {
68 atomic.StoreUintptr(x, 42)
69 }
70
71 func SwapInt32(x *int32) {
72 atomic.SwapInt32(x, 42)
73 }
74 func SwapUint32(x *uint32) {
75 atomic.SwapUint32(x, 42)
76 }
77 func SwapUintptr(x *uintptr) {
78 atomic.SwapUintptr(x, 42)
79 }
80
View as plain text