LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 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 #include "runtime.h" | 6 #include "runtime.h" |
7 #include "arch_GOARCH.h" | 7 #include "arch_GOARCH.h" |
8 #include "type.h" | 8 #include "type.h" |
9 | 9 |
10 func GOMAXPROCS(n int) (ret int) { | 10 func GOMAXPROCS(n int) (ret int) { |
(...skipping 23 matching lines...) Expand all Loading... |
34 func parForDo(desc *ParFor) { | 34 func parForDo(desc *ParFor) { |
35 runtime·parfordo(desc); | 35 runtime·parfordo(desc); |
36 } | 36 } |
37 | 37 |
38 func parForIters(desc *ParFor, tid uintptr) (start uintptr, end uintptr) { | 38 func parForIters(desc *ParFor, tid uintptr) (start uintptr, end uintptr) { |
39 runtime·parforiters(desc, tid, &start, &end); | 39 runtime·parforiters(desc, tid, &start, &end); |
40 } | 40 } |
41 | 41 |
42 func gogoBytes() (x int32) { | 42 func gogoBytes() (x int32) { |
43 x = RuntimeGogoBytes; | 43 x = RuntimeGogoBytes; |
| 44 } |
| 45 |
| 46 func getseh_go() (x uintptr) { |
| 47 x = (uintptr)runtime·getseh(); |
44 } | 48 } |
45 | 49 |
46 func typestring(e Eface) (s String) { | 50 func typestring(e Eface) (s String) { |
47 s = *e.type->string; | 51 s = *e.type->string; |
48 } | 52 } |
49 | 53 |
50 func golockedOSThread() (ret bool) { | 54 func golockedOSThread() (ret bool) { |
51 ret = runtime·lockedOSThread(); | 55 ret = runtime·lockedOSThread(); |
52 } | 56 } |
53 | 57 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 123 |
120 mp = m; | 124 mp = m; |
121 // Disable preemption. | 125 // Disable preemption. |
122 mp->locks++; | 126 mp->locks++; |
123 p = mp->p->id; | 127 p = mp->p->id; |
124 } | 128 } |
125 | 129 |
126 func sync·runtime_procUnpin() { | 130 func sync·runtime_procUnpin() { |
127 m->locks--; | 131 m->locks--; |
128 } | 132 } |
LEFT | RIGHT |