diff options
author | Joel Sing <joel@sing.id.au> | 2016-12-08 00:22:09 +1100 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-12-12 01:30:39 +0000 |
commit | f91ddaabe618c488ebe41262216eaaf14262eb1a (patch) | |
tree | 042e43f0264656eb1bde5b396a39cd0b44774bb9 /src/runtime/sys_openbsd_amd64.s | |
parent | cbcc1db41c505cd8e19e27f9844276dc35d527be (diff) | |
download | go-f91ddaabe618c488ebe41262216eaaf14262eb1a.tar.gz go-f91ddaabe618c488ebe41262216eaaf14262eb1a.zip |
runtime, syscall: update openbsd for changes to syskill
Change the openbsd runtime to use the current sys_kill and sys_thrkill
system calls.
Prior to OpenBSD 5.9 the sys_kill system call could be used with both
processes and threads. In OpenBSD 5.9 this functionality was split into
a sys_kill system call for processes (with a new syscall number) and a
sys_thrkill system call for threads. The original/legacy system call was
retained in OpenBSD 5.9 and OpenBSD 6.0, however has been removed and
will not exist in the upcoming OpenBSD 6.1 release.
Note: This change is needed to make Go work on OpenBSD 6.1 (to be
released in May 2017) and should be included in the Go 1.8 release.
This change also drops support for OpenBSD 5.8, which is already an
unsupported OpenBSD release.
Change-Id: I525ed9b57c66c0c6f438dfa32feb29c7eefc72b0
Reviewed-on: https://go-review.googlesource.com/34093
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/sys_openbsd_amd64.s')
-rw-r--r-- | src/runtime/sys_openbsd_amd64.s | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/sys_openbsd_amd64.s b/src/runtime/sys_openbsd_amd64.s index 01d6bd8e85..6ca5a81d2a 100644 --- a/src/runtime/sys_openbsd_amd64.s +++ b/src/runtime/sys_openbsd_amd64.s @@ -156,9 +156,10 @@ TEXT runtime·usleep(SB),NOSPLIT,$16 TEXT runtime·raise(SB),NOSPLIT,$16 MOVL $299, AX // sys_getthrid SYSCALL - MOVQ AX, DI // arg 1 - pid + MOVQ AX, DI // arg 1 - tid MOVL sig+0(FP), SI // arg 2 - signum - MOVL $37, AX // sys_kill + MOVQ $0, DX // arg 3 - tcb + MOVL $119, AX // sys_thrkill SYSCALL RET @@ -167,7 +168,7 @@ TEXT runtime·raiseproc(SB),NOSPLIT,$16 SYSCALL MOVQ AX, DI // arg 1 - pid MOVL sig+0(FP), SI // arg 2 - signum - MOVL $37, AX // sys_kill + MOVL $122, AX // sys_kill SYSCALL RET |