mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
0b2a74e89c
commit
1f28238557
5 changed files with 12 additions and 2 deletions
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue