diff --git a/unix/syscall_linux_arm.go b/unix/syscall_linux_arm.go index 3ec7a932..ad2bd258 100644 --- a/unix/syscall_linux_arm.go +++ b/unix/syscall_linux_arm.go @@ -257,3 +257,11 @@ func Poll(fds []PollFd, timeout int) (n int, err error) { } return poll(&fds[0], len(fds), timeout) } + +//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE + +func SyncFileRange(fd int, off int64, n int64, flags int) error { + // The sync_file_range and arm_sync_file_range syscalls differ only in the + // order of their arguments. + return armSyncFileRange(fd, flags, off, n) +} diff --git a/unix/zsyscall_linux_arm.go b/unix/zsyscall_linux_arm.go index 75db4c0c..012261ad 100644 --- a/unix/zsyscall_linux_arm.go +++ b/unix/zsyscall_linux_arm.go @@ -2282,3 +2282,13 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) { + _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +}