syscall: add Mmap, Munmap on Linux, FreeBSD, OS X

* tweak mksyscall*.pl to be more gofmt-compatible.
* add mkall.sh -syscalls option.
* add sys/mman.h constants on OS X

R=r, eds, niemeyer
CC=golang-dev
https://golang.org/cl/4369044
This commit is contained in:
Russ Cox 2011-04-06 17:52:02 -04:00
parent c45a08e5ba
commit 48ae1f2d9b
22 changed files with 343 additions and 16 deletions

View file

@ -50,6 +50,7 @@ package syscall
//sys sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno int)
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, errno int)
//sys sendmsg(s int, msg *Msghdr, flags int) (errno int)
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, errno int)
func Getpagesize() int { return 4096 }