Commit 1b739671 authored by Andrei Gherzan's avatar Andrei Gherzan Committed by Tobias Klauser

unix: implement SyncFileRange for ARM

Change-Id: I5a98a732c0e6a229ab93acbce08b4f780f860f72
GitHub-Last-Rev: 886bffd986fbb7be149e7df3bda65331a74db0b8
GitHub-Pull-Request: golang/sys#16
Reviewed-on: https://go-review.googlesource.com/133015Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent fa5fdf94
......@@ -141,6 +141,7 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
}
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_ARM_SYNC_FILE_RANGE
func Fstatfs(fd int, buf *Statfs_t) (err error) {
_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
......
......@@ -2177,6 +2177,16 @@ func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
_, _, e1 := Syscall9(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), 0, uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getrlimit(resource int, rlim *rlimit32) (err error) {
_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
......
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