runtime: unify sigtrampgo

Combine the various versions of sigtrampgo into a single function in
signal_unix.go. This requires defining a fixsigcode method on sigctxt
for all operating systems; it only does something on Darwin. This also
requires changing the darwin/amd64 signal handler to call sigreturn
itself, rather than relying on sigtrampgo to call sigreturn for it. We
can then drop the Darwin sigreturn function, as it is no longer used.

Change-Id: I5a0b9d2d2c141957e151b41e694efeb20e4b4b9a
Reviewed-on: https://go-review.googlesource.com/29761
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2016-09-25 21:33:27 -07:00
parent 1906d93bfd
commit c2735039f3
13 changed files with 78 additions and 204 deletions

View file

@ -318,6 +318,9 @@ func sigmaskToSigset(m sigmask) sigset {
return set
}
func (c *sigctxt) fixsigcode(sig uint32) {
}
//go:nosplit
func semacreate(mp *m) {
if mp.waitsema != 0 {