LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 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 // Expose some runtime functions for testing. | 5 // Expose some runtime functions for testing. |
6 // Must be in a non-cgo-using package so that | 6 // Must be in a non-cgo-using package so that |
7 // the go command compiles this file with 6c, not gcc. | 7 // the go command compiles this file with 6c, not gcc. |
8 | 8 |
9 // +build gc | 9 // +build gc |
10 | 10 |
11 typedef char bool; | 11 typedef char bool; |
12 | 12 |
13 bool runtime·lockedOSThread(void); | |
14 | |
15 static void | |
16 FLUSH(void*) | |
17 { | |
18 } | |
19 | |
20 void | |
21 ·LockedOSThread(bool b) | |
22 { | |
23 b = runtime·lockedOSThread(); | |
24 FLUSH(&b); | |
25 } | |
26 | |
27 // This is what a cgo-compiled stub declaration looks like. | 13 // This is what a cgo-compiled stub declaration looks like. |
28 void | 14 void |
29 ·Issue7695(struct{void *y[8*sizeof(void*)];}p) | 15 ·Issue7695(struct{void *y[8*sizeof(void*)];}p) |
30 { | 16 { |
31 USED(p); | 17 USED(p); |
32 } | 18 } |
LEFT | RIGHT |