diff options
author | Austin Clements <austin@google.com> | 2019-10-14 17:05:56 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2019-10-26 02:52:28 +0000 |
commit | 8714e39497dba141ce7ed83c6a18c3c0def66e77 (patch) | |
tree | a0cb6cb5980a58c5bca11c05741016de705fe742 /src/runtime/sys_netbsd_arm64.s | |
parent | 334291d1f629fb027bfcd7bff6d30e01dd9bf4c5 (diff) | |
download | go-8714e39497dba141ce7ed83c6a18c3c0def66e77.tar.gz go-8714e39497dba141ce7ed83c6a18c3c0def66e77.zip |
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>
Diffstat (limited to 'src/runtime/sys_netbsd_arm64.s')
-rw-r--r-- | src/runtime/sys_netbsd_arm64.s | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/runtime/sys_netbsd_arm64.s b/src/runtime/sys_netbsd_arm64.s index ccc34142aa..e70be0fa74 100644 --- a/src/runtime/sys_netbsd_arm64.s +++ b/src/runtime/sys_netbsd_arm64.s @@ -205,10 +205,9 @@ TEXT runtime·usleep(SB),NOSPLIT,$24-4 SVC $SYS___nanosleep50 RET -TEXT runtime·raise(SB),NOSPLIT,$16 - SVC $SYS__lwp_self - // arg 1 - target (lwp_self) - MOVW sig+0(FP), R1 // arg 2 - signo +TEXT runtime·lwp_kill(SB),NOSPLIT,$0-16 + MOVW tid+0(FP), R0 // arg 1 - target + MOVD sig+8(FP), R1 // arg 2 - signo SVC $SYS__lwp_kill RET |