Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(236)

Delta Between Two Patch Sets: src/pkg/runtime/signal_unix.c

Issue 160200044: [dev.power64] code review 160200044: build: merge default into dev.power64 (Closed)
Left Patch Set: Created 10 years, 4 months ago
Right Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/signal_nacl_amd64p32.h ('k') | src/pkg/runtime/signal_unix.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2012 The Go Authors. All rights reserved. 1 // Copyright 2012 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 // +build darwin dragonfly freebsd linux netbsd openbsd solaris 5 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 6
7 #include "runtime.h" 7 #include "runtime.h"
8 #include "defs_GOOS_GOARCH.h" 8 #include "defs_GOOS_GOARCH.h"
9 #include "os_GOOS.h" 9 #include "os_GOOS.h"
10 #include "signal_unix.h" 10 #include "signal_unix.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } else { 86 } else {
87 it.it_interval.tv_sec = 0; 87 it.it_interval.tv_sec = 0;
88 it.it_interval.tv_usec = 1000000 / hz; 88 it.it_interval.tv_usec = 1000000 / hz;
89 it.it_value = it.it_interval; 89 it.it_value = it.it_interval;
90 runtime·setitimer(ITIMER_PROF, &it, nil); 90 runtime·setitimer(ITIMER_PROF, &it, nil);
91 } 91 }
92 g->m->profilehz = hz; 92 g->m->profilehz = hz;
93 } 93 }
94 94
95 void 95 void
96 os·sigpipe(void) 96 runtime·sigpipe(void)
97 { 97 {
98 runtime·setsig(SIGPIPE, SIG_DFL, false); 98 runtime·setsig(SIGPIPE, SIG_DFL, false);
99 runtime·raise(SIGPIPE); 99 runtime·raise(SIGPIPE);
100 } 100 }
101 101
102 void 102 void
103 runtime·crash(void) 103 runtime·crash(void)
104 { 104 {
105 #ifdef GOOS_darwin 105 #ifdef GOOS_darwin
106 // OS X core dumps are linear dumps of the mapped memory, 106 // OS X core dumps are linear dumps of the mapped memory,
107 // from the first virtual byte to the last, with zeros in the gaps. 107 // from the first virtual byte to the last, with zeros in the gaps.
108 // Because of the way we arrange the address space on 64-bit systems, 108 // Because of the way we arrange the address space on 64-bit systems,
109 // this means the OS X core file will be >128 GB and even on a zippy 109 // this means the OS X core file will be >128 GB and even on a zippy
110 // workstation can take OS X well over an hour to write (uninterruptible ). 110 // workstation can take OS X well over an hour to write (uninterruptible ).
111 // Save users from making that mistake. 111 // Save users from making that mistake.
112 if(sizeof(void*) == 8) 112 if(sizeof(void*) == 8)
113 return; 113 return;
114 #endif 114 #endif
115 115
116 runtime·unblocksignals(); 116 runtime·unblocksignals();
117 runtime·setsig(SIGABRT, SIG_DFL, false); 117 runtime·setsig(SIGABRT, SIG_DFL, false);
118 runtime·raise(SIGABRT); 118 runtime·raise(SIGABRT);
119 } 119 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b