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 | 10 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // output depends on the input. noescape is inlined and currently | 157 // output depends on the input. noescape is inlined and currently |
158 // compiles down to a single xor instruction. | 158 // compiles down to a single xor instruction. |
159 // USE CAREFULLY! | 159 // USE CAREFULLY! |
160 //go:nosplit | 160 //go:nosplit |
161 func noescape(p unsafe.Pointer) unsafe.Pointer { | 161 func noescape(p unsafe.Pointer) unsafe.Pointer { |
162 x := uintptr(p) | 162 x := uintptr(p) |
163 return unsafe.Pointer(x ^ 0) | 163 return unsafe.Pointer(x ^ 0) |
164 } | 164 } |
165 | 165 |
166 func entersyscall() | 166 func entersyscall() |
| 167 func reentersyscall(pc uintptr, sp unsafe.Pointer) |
167 func entersyscallblock() | 168 func entersyscallblock() |
168 func exitsyscall() | 169 func exitsyscall() |
169 | 170 |
170 func cgocallback(fn, frame unsafe.Pointer, framesize uintptr) | 171 func cgocallback(fn, frame unsafe.Pointer, framesize uintptr) |
171 func gogo(buf *gobuf) | 172 func gogo(buf *gobuf) |
172 func gosave(buf *gobuf) | 173 func gosave(buf *gobuf) |
173 func read(fd int32, p unsafe.Pointer, n int32) int32 | 174 func read(fd int32, p unsafe.Pointer, n int32) int32 |
174 func close(fd int32) int32 | 175 func close(fd int32) int32 |
175 func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32 | 176 func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32 |
176 | 177 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 249 |
249 // return0 is a stub used to return 0 from deferproc. | 250 // return0 is a stub used to return 0 from deferproc. |
250 // It is called at the very end of deferproc to signal | 251 // It is called at the very end of deferproc to signal |
251 // the calling Go function that it should not jump | 252 // the calling Go function that it should not jump |
252 // to deferreturn. | 253 // to deferreturn. |
253 // in asm_*.s | 254 // in asm_*.s |
254 func return0() | 255 func return0() |
255 | 256 |
256 // thunk to call time.now. | 257 // thunk to call time.now. |
257 func timenow() (sec int64, nsec int32) | 258 func timenow() (sec int64, nsec int32) |
LEFT | RIGHT |