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>
This commit is contained in:
Shenghou Ma 2014-12-31 20:55:47 -05:00 committed by Minux Ma
parent 0b2a74e89c
commit 1f28238557
5 changed files with 12 additions and 2 deletions

View file

@ -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))
}