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_386.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_386.s')
-rw-r--r-- | src/runtime/sys_openbsd_386.s | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/runtime/sys_openbsd_386.s b/src/runtime/sys_openbsd_386.s index e969395088..997c07fe17 100644 --- a/src/runtime/sys_openbsd_386.s +++ b/src/runtime/sys_openbsd_386.s @@ -79,14 +79,15 @@ TEXT runtime·usleep(SB),NOSPLIT,$24 INT $0x80 RET -TEXT runtime·raise(SB),NOSPLIT,$12 +TEXT runtime·raise(SB),NOSPLIT,$16 MOVL $299, AX // sys_getthrid INT $0x80 MOVL $0, 0(SP) - MOVL AX, 4(SP) // arg 1 - pid + MOVL AX, 4(SP) // arg 1 - tid MOVL sig+0(FP), AX MOVL AX, 8(SP) // arg 2 - signum - MOVL $37, AX // sys_kill + MOVL $0, 12(SP) // arg 3 - tcb + MOVL $119, AX // sys_thrkill INT $0x80 RET @@ -97,7 +98,7 @@ TEXT runtime·raiseproc(SB),NOSPLIT,$12 MOVL AX, 4(SP) // arg 1 - pid MOVL sig+0(FP), AX MOVL AX, 8(SP) // arg 2 - signum - MOVL $37, AX // sys_kill + MOVL $122, AX // sys_kill INT $0x80 RET |