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:
Eric
2015-03-27 16:47:22 +00:00
committed by Rob Pike
parent 71c96e4240
commit ea745763b1
12 changed files with 103 additions and 1 deletions
+1
View File
@@ -86,6 +86,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Fadvise(fd int, advice int64, offset int64, length int) = SYS_FADVISE64
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)