aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_darwin.go
diff options
context:
space:
mode:
authorElias Naur <elias.naur@gmail.com>2018-05-21 15:33:20 +0200
committerElias Naur <elias.naur@gmail.com>2018-05-21 19:42:49 +0000
commit467e15accc95d4e080a8088eaff0aaa28f572c7e (patch)
treefea470fddf70186c13884670b078c488d1f1ea73 /src/runtime/os_darwin.go
parentb88276da6626102801a3621839d8f198176816ce (diff)
downloadgo-467e15accc95d4e080a8088eaff0aaa28f572c7e.tar.gz
go-467e15accc95d4e080a8088eaff0aaa28f572c7e.zip
runtime: use raise instead of pthread_self and pthread_kill
pthread_self and pthread_kill are not safe to call from a signal handler. In particular, pthread_self fails in iOS when called from a signal handler context. Use raise instead; it is signal handler safe and simpler. Change-Id: I0cbfe25151aed245f55d7b76719ce06dc78c6a75 Reviewed-on: https://go-review.googlesource.com/113877 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/os_darwin.go')
-rw-r--r--src/runtime/os_darwin.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/runtime/os_darwin.go b/src/runtime/os_darwin.go
index 4df1fba17d..9a5a03a45d 100644
--- a/src/runtime/os_darwin.go
+++ b/src/runtime/os_darwin.go
@@ -539,12 +539,6 @@ func sigtramp(fn uintptr, infostyle, sig uint32, info *siginfo, ctx unsafe.Point
//go:noescape
func setitimer(mode int32, new, old *itimerval)
-//go:nosplit
-func raise(sig uint32) {
- tid := pthread_self()
- pthread_kill(tid, int(sig))
-}
-
func raiseproc(sig uint32)
//extern SigTabTT runtimeĀ·sigtab[];