Left: | ||
Right: |
OLD | NEW |
---|---|
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 // output depends on the input. noescape is inlined and currently | 138 // output depends on the input. noescape is inlined and currently |
139 // compiles down to a single xor instruction. | 139 // compiles down to a single xor instruction. |
140 // USE CAREFULLY! | 140 // USE CAREFULLY! |
141 //go:nosplit | 141 //go:nosplit |
142 func noescape(p unsafe.Pointer) unsafe.Pointer { | 142 func noescape(p unsafe.Pointer) unsafe.Pointer { |
143 x := uintptr(p) | 143 x := uintptr(p) |
144 return unsafe.Pointer(x ^ 0) | 144 return unsafe.Pointer(x ^ 0) |
145 } | 145 } |
146 | 146 |
147 func entersyscall() | 147 func entersyscall() |
148 func reentersyscall(pc uintptr, sp unsafe.Pointer) | |
dvyukov
2014/09/13 01:00:40
s/pc uintptr, sp unsafe.Pointer/pc, sp unsafe.Poin
marcan
2014/09/16 07:08:31
Done.
| |
148 func entersyscallblock() | 149 func entersyscallblock() |
149 func exitsyscall() | 150 func exitsyscall() |
150 | 151 |
151 func cgocallback(fn, frame unsafe.Pointer, framesize uintptr) | 152 func cgocallback(fn, frame unsafe.Pointer, framesize uintptr) |
152 func gogo(buf *gobuf) | 153 func gogo(buf *gobuf) |
153 func gosave(buf *gobuf) | 154 func gosave(buf *gobuf) |
154 func read(fd int32, p unsafe.Pointer, n int32) int32 | 155 func read(fd int32, p unsafe.Pointer, n int32) int32 |
155 func close(fd int32) int32 | 156 func close(fd int32) int32 |
156 func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32 | 157 func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32 |
157 | 158 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 | 230 |
230 // return0 is a stub used to return 0 from deferproc. | 231 // return0 is a stub used to return 0 from deferproc. |
231 // It is called at the very end of deferproc to signal | 232 // It is called at the very end of deferproc to signal |
232 // the calling Go function that it should not jump | 233 // the calling Go function that it should not jump |
233 // to deferreturn. | 234 // to deferreturn. |
234 // in asm_*.s | 235 // in asm_*.s |
235 func return0() | 236 func return0() |
236 | 237 |
237 // thunk to call time.now. | 238 // thunk to call time.now. |
238 func timenow() (sec int64, nsec int32) | 239 func timenow() (sec int64, nsec int32) |
OLD | NEW |