Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 enum | 9 enum |
10 { | 10 { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 } | 230 } |
231 | 231 |
232 static int8 badsignal[] = "runtime: signal received on thread not created by Go. \n"; | 232 static int8 badsignal[] = "runtime: signal received on thread not created by Go. \n"; |
233 | 233 |
234 // This runs on a foreign stack, without an m or a g. No stack split. | 234 // This runs on a foreign stack, without an m or a g. No stack split. |
235 #pragma textflag 7 | 235 #pragma textflag 7 |
236 void | 236 void |
237 runtime·badsignal(int32 sig) | 237 runtime·badsignal(int32 sig) |
238 { | 238 { |
239 if (sig == SIGPROF) { | 239 if (sig == SIGPROF) { |
240 » » /* Ignore SIGPROFs intended for a non-Go thread. */ | 240 » » return; // Ignore SIGPROFs intended for a non-Go thread. |
rsc
2012/08/31 17:42:18
return
}
No else.
http://golang.org/doc/effectiv
adonovan
2012/09/04 18:41:04
Done, everywhere.
| |
241 » } else { | 241 » } |
242 » » runtime·panicstring(badsignal); | 242 » runtime·write(2, badsignal, sizeof badsignal - 1); |
243 » } | 243 » runtime.exit(1) |
244 } | 244 } |
LEFT | RIGHT |