LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2014 The Go Authors. All rights reserved. | 1 // Copyright 2014 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package runtime | 5 package runtime |
6 | 6 |
7 import "unsafe" | 7 import "unsafe" |
8 | 8 |
9 // Declarations for runtime services implemented in C or assembly. | 9 // Declarations for runtime services implemented in C or assembly. |
10 // C implementations of these functions are in stubs.goc. | 10 // C implementations of these functions are in stubs.goc. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 func goatomicstorep(p unsafe.Pointer, v unsafe.Pointer) // *p = v | 120 func goatomicstorep(p unsafe.Pointer, v unsafe.Pointer) // *p = v |
121 | 121 |
122 // in stubs.goc | 122 // in stubs.goc |
123 // if *p == x { *p = y; return true } else { return false }, atomically | 123 // if *p == x { *p = y; return true } else { return false }, atomically |
124 //go:noescape | 124 //go:noescape |
125 func gocas(p *uint32, x uint32, y uint32) bool | 125 func gocas(p *uint32, x uint32, y uint32) bool |
126 | 126 |
127 //go:noescape | 127 //go:noescape |
128 func gocasx(p *uintptr, x uintptr, y uintptr) bool | 128 func gocasx(p *uintptr, x uintptr, y uintptr) bool |
129 | 129 |
| 130 //go:noescape |
| 131 func gocasp(p unsafe.Pointer, x unsafe.Pointer, y unsafe.Pointer) bool |
| 132 |
130 func goreadgogc() int32 | 133 func goreadgogc() int32 |
131 func gonanotime() int64 | 134 func gonanotime() int64 |
132 func gosched() | 135 func gosched() |
133 func starttheworld() | 136 func starttheworld() |
134 func stoptheworld() | 137 func stoptheworld() |
135 func clearpools() | 138 func clearpools() |
136 | 139 |
137 // exported value for testing | 140 // exported value for testing |
138 var hashLoad = loadFactor | 141 var hashLoad = loadFactor |
139 | 142 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 mp := acquirem() | 205 mp := acquirem() |
203 mp.ptrarg[0] = unsafe.Pointer(n) | 206 mp.ptrarg[0] = unsafe.Pointer(n) |
204 mp.scalararg[0] = uint(uint32(t)) // low 32 bits | 207 mp.scalararg[0] = uint(uint32(t)) // low 32 bits |
205 mp.scalararg[1] = uint(t >> 32) // high 32 bits | 208 mp.scalararg[1] = uint(t >> 32) // high 32 bits |
206 releasem(mp) | 209 releasem(mp) |
207 mcall(¬etsleepg_m) | 210 mcall(¬etsleepg_m) |
208 exitsyscall() | 211 exitsyscall() |
209 } | 212 } |
210 | 213 |
211 func exitsyscall() | 214 func exitsyscall() |
LEFT | RIGHT |