LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 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 #include "runtime.h" | 5 #include "runtime.h" |
6 #include "arch.h" | 6 #include "arch_GOARCH.h" |
7 #include "stack.h" | 7 #include "stack.h" |
8 #include "cgocall.h" | 8 #include "cgocall.h" |
9 | 9 |
10 // Cgo call and callback support. | 10 // Cgo call and callback support. |
11 // | 11 // |
12 // To call into the C function f from Go, the cgo-generated code calls | 12 // To call into the C function f from Go, the cgo-generated code calls |
13 // runtime.cgocall(_cgo_Cfunc_f, frame), where _cgo_Cfunc_f is a | 13 // runtime.cgocall(_cgo_Cfunc_f, frame), where _cgo_Cfunc_f is a |
14 // gcc-compiled function written by cgo. | 14 // gcc-compiled function written by cgo. |
15 // | 15 // |
16 // runtime.cgocall (below) locks g to m, calls entersyscall | 16 // runtime.cgocall (below) locks g to m, calls entersyscall |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 runtime·badcgocallback(void) // called from assembly | 238 runtime·badcgocallback(void) // called from assembly |
239 { | 239 { |
240 runtime·throw("runtime: misaligned stack in cgocallback"); | 240 runtime·throw("runtime: misaligned stack in cgocallback"); |
241 } | 241 } |
242 | 242 |
243 void | 243 void |
244 runtime·cgounimpl(void) // called from (incomplete) assembly | 244 runtime·cgounimpl(void) // called from (incomplete) assembly |
245 { | 245 { |
246 runtime·throw("runtime: cgo not implemented"); | 246 runtime·throw("runtime: cgo not implemented"); |
247 } | 247 } |
LEFT | RIGHT |