Commit 80c46259 authored by Aaron Jacobs's avatar Aaron Jacobs

Oops, set MS_SYNC or Linux does nothing.

parent 917735c3
......@@ -176,13 +176,14 @@ func dup2(oldfd int, newfd int) (err error) {
return
}
// Call msync(2) on a slice previously returned by mmap(2).
// Call msync(2) with the MS_SYNC flag on a slice previously returned by
// mmap(2).
func msync(p []byte) (err error) {
_, _, errno := unix.Syscall(
unix.SYS_MSYNC,
uintptr(unsafe.Pointer(&p[0])),
uintptr(len(p)),
0)
unix.MS_SYNC)
if errno != 0 {
err = errno
......
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