OLD | NEW |
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 "defs.h" | 6 #include "defs.h" |
7 #include "signals.h" | 7 #include "signals.h" |
8 #include "os.h" | 8 #include "os.h" |
9 | 9 |
10 void | 10 void |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 sigaction(SIGPROF, SIG_IGN, true); | 168 sigaction(SIGPROF, SIG_IGN, true); |
169 } else { | 169 } else { |
170 sigaction(SIGPROF, runtime·sighandler, true); | 170 sigaction(SIGPROF, runtime·sighandler, true); |
171 it.it_interval.tv_sec = 0; | 171 it.it_interval.tv_sec = 0; |
172 it.it_interval.tv_usec = 1000000 / hz; | 172 it.it_interval.tv_usec = 1000000 / hz; |
173 it.it_value = it.it_interval; | 173 it.it_value = it.it_interval; |
174 runtime·setitimer(ITIMER_PROF, &it, nil); | 174 runtime·setitimer(ITIMER_PROF, &it, nil); |
175 } | 175 } |
176 m->profilehz = hz; | 176 m->profilehz = hz; |
177 } | 177 } |
| 178 |
| 179 void |
| 180 os·sigpipe(void) |
| 181 { |
| 182 sigaction(SIGPIPE, SIG_DFL, false); |
| 183 runtime·raisesigpipe(); |
| 184 } |
OLD | NEW |