syscall: move bsd mmap syscall

The mmap system call varies across BSDs. Move mmap and munmap into
the operating system dependent files. This will be needed to add
syscall support for OpenBSD.

R=rsc
CC=golang-dev
https://golang.org/cl/4822056
This commit is contained in:
Joel Sing 2011-08-08 09:56:45 -04:00 committed by Russ Cox
parent f6fab25582
commit 68fea34be3
7 changed files with 72 additions and 71 deletions

View file

@ -612,9 +612,6 @@ func Futimes(fd int, tv []Timeval) (errno int) {
// Msync(addr *byte, len int, flags int) (errno int)
// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, errno int)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, errno int)
//sys munmap(addr uintptr, length uintptr) (errno int)
var mapper = &mmapper{
active: make(map[*byte][]byte),
mmap: mmap,