]> Cypherpunks repositories - gostls13.git/commit
runtime: M-targeted signals for BSDs
authorAustin Clements <austin@google.com>
Mon, 14 Oct 2019 21:05:56 +0000 (17:05 -0400)
committerAustin Clements <austin@google.com>
Sat, 26 Oct 2019 02:52:28 +0000 (02:52 +0000)
commit8714e39497dba141ce7ed83c6a18c3c0def66e77
treea0cb6cb5980a58c5bca11c05741016de705fe742
parent334291d1f629fb027bfcd7bff6d30e01dd9bf4c5
runtime: M-targeted signals for BSDs

For these, we split up the existing runtime.raise assembly
implementation into its constituent "get thread ID" and "signal
thread" parts. This lets us implement signalM and reimplement raise in
pure Go. (NetBSD conveniently already had lwp_self.)

We also change minit to store the procid directly, rather than
depending on newosproc to do so. This is because newosproc isn't
called for the bootstrap M, but we need a procid for every M. This is
also simpler overall.

For #10958, #24543.

Change-Id: Ie5f1fcada6a33046375066bcbe054d1f784d39c0
Reviewed-on: https://go-review.googlesource.com/c/go/+/201402
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
21 files changed:
src/runtime/defs_freebsd_386.go
src/runtime/defs_freebsd_amd64.go
src/runtime/defs_freebsd_arm.go
src/runtime/defs_freebsd_arm64.go
src/runtime/os_dragonfly.go
src/runtime/os_freebsd.go
src/runtime/os_netbsd.go
src/runtime/os_openbsd.go
src/runtime/sys_dragonfly_amd64.s
src/runtime/sys_freebsd_386.s
src/runtime/sys_freebsd_amd64.s
src/runtime/sys_freebsd_arm.s
src/runtime/sys_freebsd_arm64.s
src/runtime/sys_netbsd_386.s
src/runtime/sys_netbsd_amd64.s
src/runtime/sys_netbsd_arm.s
src/runtime/sys_netbsd_arm64.s
src/runtime/sys_openbsd_386.s
src/runtime/sys_openbsd_amd64.s
src/runtime/sys_openbsd_arm.s
src/runtime/sys_openbsd_arm64.s