mmap_freebsd_32.go (712B)
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 (freebsd && 386) || (freebsd && arm) 6 // +build freebsd,386 freebsd,arm 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_freebsd_386.go 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), uintptr(pos), uintptr(pos>>32), 0, 0) 17 ret = uintptr(r0) 18 if e1 != 0 { 19 err = e1 20 } 21 return 22 }