mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: preserve signal stack when calling Go on C thread
When calling a Go function on a C thread, if the C thread already has an alternate signal stack, use that signal stack instead of installing a new one. Update #9896. Change-Id: I62aa3a6a4a1dc4040fca050757299c8e6736987c Reviewed-on: https://go-review.googlesource.com/18108 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
62c280ac1c
commit
a7cad52e04
11 changed files with 383 additions and 14 deletions
|
|
@ -303,6 +303,7 @@ type m struct {
|
|||
spinning bool // m is out of work and is actively looking for work
|
||||
blocked bool // m is blocked on a note
|
||||
inwb bool // m is executing a write barrier
|
||||
newSigstack bool // minit on C thread called sigaltstack
|
||||
printlock int8
|
||||
fastrand uint32
|
||||
ncgocall uint64 // number of cgo calls in total
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue