blob: fe09e7029e955d3f51007a3d6281afdf9de2dfb6 [file] [log] [blame]
Brad Fitzpatrick51947442016-03-01 22:57:46 +00001// Copyright 2015 The Go Authors. All rights reserved.
Ian Lance Taylor0c1f0542015-09-29 21:24:13 -07002// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// +build !plan9
6// +build !solaris
7// +build !windows
8// +build !nacl
9// +build !linux !amd64
Fangming.Fange8d417d2018-04-08 07:32:43 +000010// +build !linux !arm64
Richard Musiol35ea6242018-03-31 23:14:17 +020011// +build !js
Elias Naurc8d07292018-05-01 10:48:19 +020012// +build !darwin
Ian Lance Taylor0c1f0542015-09-29 21:24:13 -070013
14package runtime
15
16import "unsafe"
17
Brad Fitzpatrick5fea2cc2016-03-01 23:21:55 +000018// mmap calls the mmap system call. It is implemented in assembly.
Jeremy Jackins02b8e692016-04-13 18:16:21 +090019// We only pass the lower 32 bits of file offset to the
20// assembly routine; the higher bits (if required), should be provided
21// by the assembly routine as 0.
Austin Clements193088b2017-10-16 20:28:29 -040022// The err result is an OS error code such as ENOMEM.
23func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
Ian Lance Taylorf425f542017-06-06 15:08:59 -070024
25// munmap calls the munmap system call. It is implemented in assembly.
26func munmap(addr unsafe.Pointer, n uintptr)