• Tobias Klauser's avatar
    unix: unify memory functions on BSD · 43e60d72
    Tobias Klauser authored
    Make Madvice, Mlock, Mlockall, Mprotect, Msync, Munlock and Munlockall
    available equally on all BSD flavors. NetBSD was previously lacking
    SYS_MSYNC, so add it.
    
    Reorder the //sys function prototype alphabetically and clean up already
    implemented syscalls everywhere.
    
    Also add tests for Mprotect, Msync and Madvice - now that they're
    available on all unix platforms.
    
    Fixes golang/go#18513
    
    Change-Id: I0eb502d72c7e991f191fb96225ef04e8297d8b8d
    Reviewed-on: https://go-review.googlesource.com/56172
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    43e60d72
mmap_unix_test.go 829 Bytes