gtsocial-umbx

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

mmap_openbsd.go (644B)


      1 // Copyright 2017 The Memory 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 file.
      4 
      5 //go:build 386 || amd64 || arm64
      6 // +build 386 amd64 arm64
      7 
      8 package memory
      9 
     10 import (
     11 	_ "unsafe"
     12 )
     13 
     14 // Function syscall.mmap for darwin and openbsd calls internal/abi.FuncPCABI0,
     15 // which is implemented as a compile intrinsic so the code cannot be reused.
     16 // Using go:linkname directive to link mmapSyscall to syscall.mmap
     17 
     18 //go:linkname mmapSyscall syscall.mmap
     19 func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)