diff options
| author | Russ Cox <rsc@golang.org> | 2014-11-11 17:05:55 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-11-11 17:05:55 -0500 |
| commit | 2d917c0c26f9a3ecbb5918839f9cdb4cdc311f16 (patch) | |
| tree | 05d1c196d9154f8d2f0386536baa469fd6f128f0 /src/runtime/sigqueue.go | |
| parent | 9f99d531a05027ea12315a6421edf0aa9f905d70 (diff) | |
| download | go-2d917c0c26f9a3ecbb5918839f9cdb4cdc311f16.tar.xz | |
[dev.cc] runtime: convert signal handlers from C to Go
This code overused macros and could not be
converted automatically. Instead a new sigctxt
type had to be defined for each os/arch combination,
with a common (implicit) interface used by the
arch-specific signal handler code.
[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]
LGTM=r
R=r
CC=austin, dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/168500044
Diffstat (limited to 'src/runtime/sigqueue.go')
| -rw-r--r-- | src/runtime/sigqueue.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/runtime/sigqueue.go b/src/runtime/sigqueue.go index 2d9c24d2d2..b2155ce86e 100644 --- a/src/runtime/sigqueue.go +++ b/src/runtime/sigqueue.go @@ -45,7 +45,7 @@ const ( // Called from sighandler to send a signal back out of the signal handling thread. // Reports whether the signal was sent. If not, the caller typically crashes the program. -func sigsend(s int32) bool { +func sigsend(s uint32) bool { bit := uint32(1) << uint(s&31) if !sig.inuse || s < 0 || int(s) >= 32*len(sig.wanted) || sig.wanted[s/32]&bit == 0 { return false @@ -157,9 +157,6 @@ func badsignal(sig uintptr) { cgocallback(unsafe.Pointer(funcPC(sigsend)), noescape(unsafe.Pointer(&sig)), unsafe.Sizeof(sig)) } -func sigenable_m() -func sigdisable_m() - func sigenable_go(s uint32) { g := getg() g.m.scalararg[0] = uintptr(s) |
