1
0
mirror of https://github.com/golang/go synced 2024-11-27 00:21:21 -07:00

runtime: throw in unreachable exitThread

Several OSes don't ever reach exitThread, On AIX, Plan9, Solaris, and
Windows, we throw if this function is accidentally reached. Do the same
on Darwin and OpenBSD for consistency.

Change-Id: Icd189b11179755a28b3ec48b267349c57facbf24
Reviewed-on: https://go-review.googlesource.com/c/go/+/443717
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
This commit is contained in:
Michael Pratt 2022-10-18 12:11:43 -04:00
parent e252dcf9d3
commit 1f068f0dc7
2 changed files with 2 additions and 0 deletions

View File

@ -476,6 +476,7 @@ func pthread_cond_signal_trampoline()
// Not used on Darwin, but must be defined.
func exitThread(wait *atomic.Uint32) {
throw("exitThread")
}
//go:nosplit

View File

@ -250,6 +250,7 @@ func sigaltstack_trampoline()
// Not used on OpenBSD, but must be defined.
func exitThread(wait *atomic.Uint32) {
throw("exitThread")
}
//go:nosplit