LEFT | RIGHT |
(no file at all) | |
1 // Use of this source file is governed by a BSD-style | 1 // Use of this source file is governed by a BSD-style |
2 // license that can be found in the LICENSE file.` | 2 // license that can be found in the LICENSE file.` |
3 | 3 |
4 #include "runtime.h" | 4 #include "runtime.h" |
5 #include "defs_GOOS_GOARCH.h" | 5 #include "defs_GOOS_GOARCH.h" |
6 #include "os_GOOS.h" | 6 #include "os_GOOS.h" |
7 #include "stack.h" | 7 #include "stack.h" |
8 | 8 |
9 extern SigTab runtime·sigtab[]; | 9 extern SigTab runtime·sigtab[]; |
10 extern int32 runtime·sys_umtx_op(uint32*, int32, uint32, void*, void*); | 10 extern int32 runtime·sys_umtx_op(uint32*, int32, uint32, void*, void*); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 { | 119 { |
120 runtime·goenvs_unix(); | 120 runtime·goenvs_unix(); |
121 } | 121 } |
122 | 122 |
123 // Called to initialize a new m (including the bootstrap m). | 123 // Called to initialize a new m (including the bootstrap m). |
124 void | 124 void |
125 runtime·minit(void) | 125 runtime·minit(void) |
126 { | 126 { |
127 // Initialize signal handling | 127 // Initialize signal handling |
128 m->gsignal = runtime·malg(32*1024); | 128 m->gsignal = runtime·malg(32*1024); |
129 » runtime·signalstack(m->gsignal->stackguard - StackGuard, 32*1024); | 129 » runtime·signalstack((byte*)m->gsignal->stackguard - StackGuard, 32*1024)
; |
130 runtime·sigprocmask(&sigset_none, nil); | 130 runtime·sigprocmask(&sigset_none, nil); |
131 } | 131 } |
132 | 132 |
133 void | 133 void |
134 runtime·sigpanic(void) | 134 runtime·sigpanic(void) |
135 { | 135 { |
136 switch(g->sig) { | 136 switch(g->sig) { |
137 case SIGBUS: | 137 case SIGBUS: |
138 if(g->sigcode0 == BUS_ADRERR && g->sigcode1 < 0x1000) { | 138 if(g->sigcode0 == BUS_ADRERR && g->sigcode1 < 0x1000) { |
139 if(g->sigpc == 0) | 139 if(g->sigpc == 0) |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 static int8 badsignal[] = "runtime: signal received on thread not created by Go.
\n"; | 209 static int8 badsignal[] = "runtime: signal received on thread not created by Go.
\n"; |
210 | 210 |
211 // This runs on a foreign stack, without an m or a g. No stack split. | 211 // This runs on a foreign stack, without an m or a g. No stack split. |
212 #pragma textflag 7 | 212 #pragma textflag 7 |
213 void | 213 void |
214 runtime·badsignal(void) | 214 runtime·badsignal(void) |
215 { | 215 { |
216 runtime·write(2, badsignal, sizeof badsignal - 1); | 216 runtime·write(2, badsignal, sizeof badsignal - 1); |
217 } | 217 } |
LEFT | RIGHT |