diff options
author | Shenghou Ma <minux@golang.org> | 2014-12-31 20:55:47 -0500 |
---|---|---|
committer | Minux Ma <minux@golang.org> | 2015-01-01 04:41:43 +0000 |
commit | 1f282385579fc404f1246fd7ffa8b4e517401d19 (patch) | |
tree | e75969639d397f07c5881f8738d2896177415bf0 /src/runtime/sigqueue.go | |
parent | 0b2a74e89cf940e1c4cd91785ff3d744684edc49 (diff) | |
download | go-git-1f282385579fc404f1246fd7ffa8b4e517401d19.tar.gz |
runtime: provide a dummy value of _SIGPROF on plan9 and windows
Fixes build on plan9 and windows.
Change-Id: Ic9b02c641ab84e4f6d8149de71b9eb495e3343b2
Reviewed-on: https://go-review.googlesource.com/2233
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/sigqueue.go')
-rw-r--r-- | src/runtime/sigqueue.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime/sigqueue.go b/src/runtime/sigqueue.go index a760790396..543651076d 100644 --- a/src/runtime/sigqueue.go +++ b/src/runtime/sigqueue.go @@ -160,8 +160,13 @@ func badsignal(sig uintptr) { // call to cgocallback below will bring down the whole process. // It's better to miss a few SIGPROF signals than to abort in this case. // See http://golang.org/issue/9456. - if sig == _SIGPROF && needextram != 0 { - return + switch GOOS { + case "windows", "plan9": + // no actual SIGPROF is defined, nothing to do + default: + if sig == _SIGPROF && needextram != 0 { + return + } } cgocallback(unsafe.Pointer(funcPC(sigsend)), noescape(unsafe.Pointer(&sig)), unsafe.Sizeof(sig)) } |