Commit adc6ba92 authored by Mikio Hara's avatar Mikio Hara

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/37170Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent b4690f45
...@@ -6,6 +6,3 @@ ...@@ -6,6 +6,3 @@
TEXT ·sysvicall6(SB),NOSPLIT,$0-88 TEXT ·sysvicall6(SB),NOSPLIT,$0-88
JMP syscall·sysvicall6(SB) JMP syscall·sysvicall6(SB)
TEXT ·keepAlive(SB),NOSPLIT,$0
RET
...@@ -19,13 +19,8 @@ var procIoctl uintptr ...@@ -19,13 +19,8 @@ var procIoctl uintptr
func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno) func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
// TODO: replace with runtime.KeepAlive when available
//go:noescape
func keepAlive(p unsafe.Pointer)
func ioctl(s, ioc uintptr, arg unsafe.Pointer) error { func ioctl(s, ioc uintptr, arg unsafe.Pointer) error {
_, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procIoctl)), 3, s, ioc, uintptr(arg), 0, 0, 0) _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procIoctl)), 3, s, ioc, uintptr(arg), 0, 0, 0)
keepAlive(arg)
if errno != 0 { if errno != 0 {
return error(errno) return error(errno)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment