mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-06 09:07:16 -04:00
unix: Added posix_fadvise support for Linux and FreeBSD
Support includes 386, amd64, and arm for both Linux and FreeBSD. FreeBSD changes courtesy Dave Chapeskie <dchapeskie@gmail.com> Change-Id: I89dc18533d7178e74ae6c442a2e6272c9bd9692c Reviewed-on: https://go-review.googlesource.com/8055 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
@@ -652,6 +652,16 @@ func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fchdir(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
Reference in New Issue
Block a user