]> Cypherpunks repositories - gostls13.git/commit
runtime: use raise instead of pthread_self and pthread_kill
authorElias Naur <elias.naur@gmail.com>
Mon, 21 May 2018 13:33:20 +0000 (15:33 +0200)
committerElias Naur <elias.naur@gmail.com>
Mon, 21 May 2018 19:42:49 +0000 (19:42 +0000)
commit467e15accc95d4e080a8088eaff0aaa28f572c7e
treefea470fddf70186c13884670b078c488d1f1ea73
parentb88276da6626102801a3621839d8f198176816ce
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>
src/runtime/os_darwin.go
src/runtime/sys_darwin.go
src/runtime/sys_darwin_386.s
src/runtime/sys_darwin_amd64.s