unix: implement SyncFileRange for ARM

This commit is contained in:
Andrei Gherzan
2018-08-10 19:22:34 +01:00
parent fa5fdf94c7
commit 886bffd986
2 changed files with 11 additions and 0 deletions

View File

@@ -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)))

View File

@@ -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 {