]> Cypherpunks repositories - gostls13.git/commit
runtime: fix/improve exitThread on openbsd
authorJoel Sing <joel@sing.id.au>
Thu, 5 Apr 2018 19:00:25 +0000 (05:00 +1000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 5 Apr 2018 19:29:35 +0000 (19:29 +0000)
commita7bb8d3eb8ffd99fc6728dd1b27152cebbb45dc4
treed8f0e90fe9e200d388fe34716085b775d731f011
parentd3026dd30ac8a5254ec2165938624397fdecf132
runtime: fix/improve exitThread on openbsd

OpenBSD's __threxit syscall takes a pointer to a 32-bit value that will be
zeroed immediately before the thread exits. Make use of this instead of
zeroing freeWait from the exitThread assembly and using hacks like switching
to a static stack, so this works on 386.

Change-Id: I3ec5ead82b6496404834d148f713794d5d9da723
Reviewed-on: https://go-review.googlesource.com/105055
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/sys_openbsd_386.s
src/runtime/sys_openbsd_amd64.s
src/runtime/sys_openbsd_arm.s