github.com/mdempsky/go@v0.0.0-20151201204031-5dd372bd1e70/src/runtime/signal_linux.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package runtime
     6  
     7  import "unsafe"
     8  
     9  // Continuation of the (assembly) sigtramp() logic.
    10  //go:nosplit
    11  func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) {
    12  	if sigfwdgo(sig, info, ctx) {
    13  		return
    14  	}
    15  	g := getg()
    16  	if g == nil {
    17  		badsignal(uintptr(sig))
    18  		return
    19  	}
    20  	setg(g.m.gsignal)
    21  	sighandler(sig, info, ctx, g)
    22  	setg(g)
    23  }