]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unnecessary GOOS switch
authorIan Lance Taylor <iant@golang.org>
Sun, 4 Jan 2015 19:36:54 +0000 (11:36 -0800)
committerIan Lance Taylor <iant@golang.org>
Sun, 4 Jan 2015 19:41:05 +0000 (19:41 +0000)
Change-Id: I8f518e273c02110042b08f7c50c3d38a648c8b6e
Reviewed-on: https://go-review.googlesource.com/2281
Reviewed-by: Minux Ma <minux@golang.org>
src/runtime/sigqueue.go

index 543651076d3f22e7981e97b1d22207789fd69424..fbe3425fa60f6170d5d860c5520d9e486fab4a2b 100644 (file)
@@ -160,13 +160,8 @@ 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.
-       switch GOOS {
-       case "windows", "plan9":
-               // no actual SIGPROF is defined, nothing to do
-       default:
-               if sig == _SIGPROF && needextram != 0 {
-                       return
-               }
+       if _SIGPROF != 0 && sig == _SIGPROF && needextram != 0 {
+               return
        }
        cgocallback(unsafe.Pointer(funcPC(sigsend)), noescape(unsafe.Pointer(&sig)), unsafe.Sizeof(sig))
 }