1
0
mirror of https://github.com/golang/go synced 2024-09-30 07:18:34 -06:00

runtime: unify Unix implementations of unminit

Change-Id: I2cbb13eb85876ad05a52cbd498a9b86e7a28899c
Reviewed-on: https://go-review.googlesource.com/29772
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-26 11:35:55 -07:00
parent 6bcd258095
commit e2e11f02a4
8 changed files with 16 additions and 21 deletions

View File

@ -214,9 +214,7 @@ func minit() {
// Called from dropm to undo the effect of an minit.
func unminit() {
if getg().m.newSigstack {
signalstack(nil)
}
unminitSignals()
}
func memlimit() uintptr {

View File

@ -188,9 +188,7 @@ func minit() {
// Called from dropm to undo the effect of an minit.
//go:nosplit
func unminit() {
if getg().m.newSigstack {
signalstack(nil)
}
unminitSignals()
}
// Mach IPC, to get at semaphores

View File

@ -190,9 +190,7 @@ func minit() {
// Called from dropm to undo the effect of an minit.
//go:nosplit
func unminit() {
if getg().m.newSigstack {
signalstack(nil)
}
unminitSignals()
}
func memlimit() uintptr {

View File

@ -180,9 +180,7 @@ func minit() {
// Called from dropm to undo the effect of an minit.
//go:nosplit
func unminit() {
if getg().m.newSigstack {
signalstack(nil)
}
unminitSignals()
}
func memlimit() uintptr {

View File

@ -266,9 +266,7 @@ func minit() {
// Called from dropm to undo the effect of an minit.
//go:nosplit
func unminit() {
if getg().m.newSigstack {
signalstack(nil)
}
unminitSignals()
}
func memlimit() uintptr {

View File

@ -244,9 +244,7 @@ func minit() {
// Called from dropm to undo the effect of an minit.
//go:nosplit
func unminit() {
if getg().m.newSigstack {
signalstack(nil)
}
unminitSignals()
}
func memlimit() uintptr {

View File

@ -223,9 +223,7 @@ func minit() {
// Called from dropm to undo the effect of an minit.
//go:nosplit
func unminit() {
if getg().m.newSigstack {
signalstack(nil)
}
unminitSignals()
}
func memlimit() uintptr {

View File

@ -619,6 +619,15 @@ func minitSignalMask() {
sigprocmask(_SIG_SETMASK, &nmask, nil)
}
// unminitSignals is called from dropm, via unminit, to undo the
// effect of calling minit on a non-Go thread.
//go:nosplit
func unminitSignals() {
if getg().m.newSigstack {
signalstack(nil)
}
}
// setGsignalStack sets the gsignal stack of the current m to an
// alternate signal stack returned from the sigaltstack system call.
// This is used when handling a signal if non-Go code has set the