gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

mmap_netbsd_32.go (708B)


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