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