modernc.org/memory@v1.8.0/mmap_netbsd_64.go (about) 1 // Copyright 2009 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE-GO file. 4 5 //go:build netbsd && amd64 6 // +build netbsd,amd64 7 8 package memory 9 10 import ( 11 "syscall" 12 ) 13 14 // https://cs.opensource.google/go/go/+/refs/tags/go1.17.8:src/syscall/zsyscall_netbsd_amd64.go;l=1190 15 func mmapSyscall(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 16 r0, _, e1 := syscall.Syscall9(syscall.SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) 17 ret = uintptr(r0) 18 if e1 != 0 { 19 err = e1 20 } 21 return 22 }