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