Skip to content

Commit adc6ba9

Browse files
committed
lif: drop support for go1.5
This change drops a workaround for golang.org/issues/13372. The compiler in Go 1.6 or above handles the "conversion of a unsafe.Pointer to uintptr when calling syscall.Syscall" case correctly. Change-Id: I5b45094a78f15a631da277bbea0cb79fde25bb2a Reviewed-on: https://go-review.googlesource.com/37170 Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 parent b4690f4 commit adc6ba9

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

lif/sys_solaris_amd64.s

-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@
66

77
TEXT ·sysvicall6(SB),NOSPLIT,$0-88
88
JMP syscall·sysvicall6(SB)
9-
10-
TEXT ·keepAlive(SB),NOSPLIT,$0
11-
RET

lif/syscall.go

-5
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,8 @@ var procIoctl uintptr
1919

2020
func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
2121

22-
// TODO: replace with runtime.KeepAlive when available
23-
//go:noescape
24-
func keepAlive(p unsafe.Pointer)
25-
2622
func ioctl(s, ioc uintptr, arg unsafe.Pointer) error {
2723
_, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procIoctl)), 3, s, ioc, uintptr(arg), 0, 0, 0)
28-
keepAlive(arg)
2924
if errno != 0 {
3025
return error(errno)
3126
}

0 commit comments

Comments
 (0)