[release-branch.go1.4] runtime, syscall: update openbsd for changes to syskill

Change the openbsd runtime to use the current sys_kill and sys_thrkill
system calls.

This is a backport of https://golang.org/cl/34093 to the Go 1.4 branch.

Updates #20672

Change-Id: I4fde5bad2fbfbe99196053d69ba235b49ddb32c8
Reviewed-on: https://go-review.googlesource.com/66072
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Joel Sing 2016-12-08 00:22:09 +11:00
parent ee88852fc1
commit 197bf4ddc3
5 changed files with 13 additions and 7 deletions

View File

@ -327,4 +327,8 @@ pkg syscall (netbsd-arm), const SizeofIfData = 132
pkg syscall (netbsd-arm), type IfMsghdr struct, Pad_cgo_1 [4]uint8
pkg syscall (netbsd-arm-cgo), const SizeofIfData = 132
pkg syscall (netbsd-arm-cgo), type IfMsghdr struct, Pad_cgo_1 [4]uint8
pkg syscall (openbsd-386), const SYS_KILL = 37
pkg syscall (openbsd-386-cgo), const SYS_KILL = 37
pkg syscall (openbsd-amd64), const SYS_KILL = 37
pkg syscall (openbsd-amd64-cgo), const SYS_KILL = 37
pkg unicode, const Version = "6.3.0"

View File

@ -70,14 +70,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

View File

@ -147,9 +147,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

View File

@ -39,7 +39,6 @@ const (
SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
SYS_SYNC = 36 // { void sys_sync(void); }
SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
@ -111,6 +110,7 @@ const (
SYS_READV = 120 // { ssize_t sys_readv(int fd, \
SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }

View File

@ -39,7 +39,6 @@ const (
SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
SYS_SYNC = 36 // { void sys_sync(void); }
SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
@ -110,6 +109,7 @@ const (
SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
SYS_READV = 120 // { ssize_t sys_readv(int fd, \
SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }