aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-16 01:21:42 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-16 01:21:42 +0000
commitae306c0a93394c74cd3b9c3760eb12fc31af6ae1 (patch)
tree3ba4895137efbc8704a1663193b17465fcc62655 /libgo
parent511f628b2681f653873d46badc683ebf57c8f174 (diff)
runtime: rename siginfo to _siginfo_t
Since the name siginfo winds up in runtime.inc, this avoids a name collision on systems that define "struct siginfo" in the system header files. Reviewed-on: https://go-review.googlesource.com/35239 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/runtime/signal_gccgo.go8
-rw-r--r--libgo/go/runtime/signal_sighandler.go2
-rw-r--r--libgo/go/runtime/signal_unix.go4
-rw-r--r--libgo/go/runtime/stubs.go4
4 files changed, 8 insertions, 10 deletions
diff --git a/libgo/go/runtime/signal_gccgo.go b/libgo/go/runtime/signal_gccgo.go
index 62fe4588034..570a0766844 100644
--- a/libgo/go/runtime/signal_gccgo.go
+++ b/libgo/go/runtime/signal_gccgo.go
@@ -46,15 +46,13 @@ func kill(pid _pid_t, sig uint32) int32
//extern setitimer
func setitimer(which int32, new *_itimerval, old *_itimerval) int32
-type siginfo _siginfo_t
-
type sigTabT struct {
flags int32
name string
}
type sigctxt struct {
- info *siginfo
+ info *_siginfo_t
ctxt unsafe.Pointer
}
@@ -128,9 +126,9 @@ func raiseproc(sig uint32) {
//go:nosplit
//go:nowritebarrierrec
-func sigfwd(fn uintptr, sig uint32, info *siginfo, ctx unsafe.Pointer) {
+func sigfwd(fn uintptr, sig uint32, info *_siginfo_t, ctx unsafe.Pointer) {
f1 := &[1]uintptr{fn}
- f2 := *(*func(uint32, *siginfo, unsafe.Pointer))(unsafe.Pointer(&f1))
+ f2 := *(*func(uint32, *_siginfo_t, unsafe.Pointer))(unsafe.Pointer(&f1))
f2(sig, info, ctx)
}
diff --git a/libgo/go/runtime/signal_sighandler.go b/libgo/go/runtime/signal_sighandler.go
index a057df9018a..279001b1546 100644
--- a/libgo/go/runtime/signal_sighandler.go
+++ b/libgo/go/runtime/signal_sighandler.go
@@ -25,7 +25,7 @@ var crashing int32
// are not allowed.
//
//go:nowritebarrierrec
-func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
+func sighandler(sig uint32, info *_siginfo_t, ctxt unsafe.Pointer, gp *g) {
_g_ := getg()
c := sigctxt{info, ctxt}
diff --git a/libgo/go/runtime/signal_unix.go b/libgo/go/runtime/signal_unix.go
index 43247538b66..cd6f3fb9ba1 100644
--- a/libgo/go/runtime/signal_unix.go
+++ b/libgo/go/runtime/signal_unix.go
@@ -202,7 +202,7 @@ func sigpipe() {
// This is called by the signal handler, and the world may be stopped.
//go:nosplit
//go:nowritebarrierrec
-func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) {
+func sigtrampgo(sig uint32, info *_siginfo_t, ctx unsafe.Pointer) {
if sigfwdgo(sig, info, ctx) {
return
}
@@ -446,7 +446,7 @@ func badsignal(sig uintptr, c *sigctxt) {
// This is called by the signal handler, and the world may be stopped.
//go:nosplit
//go:nowritebarrierrec
-func sigfwdgo(sig uint32, info *siginfo, ctx unsafe.Pointer) bool {
+func sigfwdgo(sig uint32, info *_siginfo_t, ctx unsafe.Pointer) bool {
if sig >= uint32(len(sigtable)) {
return false
}
diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go
index c51ccc6d51f..bf9f62eab22 100644
--- a/libgo/go/runtime/stubs.go
+++ b/libgo/go/runtime/stubs.go
@@ -485,10 +485,10 @@ func setSigactionHandler(*_sigaction, uintptr)
// Retrieve fields from the siginfo_t and ucontext_t pointers passed
// to a signal handler using C, as they are often hidden in a union.
// Returns and, if available, PC where signal occurred.
-func getSiginfo(*siginfo, unsafe.Pointer) (sigaddr uintptr, sigpc uintptr)
+func getSiginfo(*_siginfo_t, unsafe.Pointer) (sigaddr uintptr, sigpc uintptr)
// Implemented in C for gccgo.
-func dumpregs(*siginfo, unsafe.Pointer)
+func dumpregs(*_siginfo_t, unsafe.Pointer)
// Temporary for gccgo until we port proc.go.
//go:linkname getsched runtime.getsched