summaryrefslogtreecommitdiffstats
path: root/vendor/modernc.org/memory
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/memory')
-rw-r--r--vendor/modernc.org/memory/AUTHORS1
-rw-r--r--vendor/modernc.org/memory/CONTRIBUTORS1
-rw-r--r--vendor/modernc.org/memory/mmap_darwin.go (renamed from vendor/modernc.org/memory/mmap_fallback.go)4
-rw-r--r--vendor/modernc.org/memory/mmap_freebsd_32.go1
-rw-r--r--vendor/modernc.org/memory/mmap_freebsd_64.go1
-rw-r--r--vendor/modernc.org/memory/mmap_linux_32.go2
-rw-r--r--vendor/modernc.org/memory/mmap_linux_64.go2
-rw-r--r--vendor/modernc.org/memory/mmap_netbsd_32.go1
-rw-r--r--vendor/modernc.org/memory/mmap_netbsd_64.go1
-rw-r--r--vendor/modernc.org/memory/mmap_openbsd.go19
10 files changed, 32 insertions, 1 deletions
diff --git a/vendor/modernc.org/memory/AUTHORS b/vendor/modernc.org/memory/AUTHORS
index 50f44cec..06687a28 100644
--- a/vendor/modernc.org/memory/AUTHORS
+++ b/vendor/modernc.org/memory/AUTHORS
@@ -10,3 +10,4 @@
Jan Mercl <0xjnml@gmail.com>
Steffen Butzer <steffen(dot)butzer@outlook.com>
+Gleb Sakhnov <gleb.sakhnov@gmail.com>
diff --git a/vendor/modernc.org/memory/CONTRIBUTORS b/vendor/modernc.org/memory/CONTRIBUTORS
index 72167486..c363066a 100644
--- a/vendor/modernc.org/memory/CONTRIBUTORS
+++ b/vendor/modernc.org/memory/CONTRIBUTORS
@@ -9,3 +9,4 @@
Jan Mercl <0xjnml@gmail.com>
Steffen Butzer <steffen(dot)butzer@outlook.com>
ZHU Zijia <piggynl@outlook.com>
+Gleb Sakhnov <gleb.sakhnov@gmail.com>
diff --git a/vendor/modernc.org/memory/mmap_fallback.go b/vendor/modernc.org/memory/mmap_darwin.go
index 35b2f2b0..d597cb45 100644
--- a/vendor/modernc.org/memory/mmap_fallback.go
+++ b/vendor/modernc.org/memory/mmap_darwin.go
@@ -1,7 +1,9 @@
// Copyright 2017 The Memory Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (darwin && (amd64 || arm64)) || (openbsd && (386 || amd64))
+
+//go:build amd64 || arm64
+// +build amd64 arm64
package memory
diff --git a/vendor/modernc.org/memory/mmap_freebsd_32.go b/vendor/modernc.org/memory/mmap_freebsd_32.go
index 47b29962..0055e64b 100644
--- a/vendor/modernc.org/memory/mmap_freebsd_32.go
+++ b/vendor/modernc.org/memory/mmap_freebsd_32.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE-GO file.
//go:build freebsd && 386
+// +build freebsd,386
package memory
diff --git a/vendor/modernc.org/memory/mmap_freebsd_64.go b/vendor/modernc.org/memory/mmap_freebsd_64.go
index 87a4c238..cf1c91df 100644
--- a/vendor/modernc.org/memory/mmap_freebsd_64.go
+++ b/vendor/modernc.org/memory/mmap_freebsd_64.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE-GO file.
//go:build freebsd && amd64
+// +build freebsd,amd64
package memory
diff --git a/vendor/modernc.org/memory/mmap_linux_32.go b/vendor/modernc.org/memory/mmap_linux_32.go
index 996805c4..207ad417 100644
--- a/vendor/modernc.org/memory/mmap_linux_32.go
+++ b/vendor/modernc.org/memory/mmap_linux_32.go
@@ -3,6 +3,8 @@
// license that can be found in the LICENSE-GO file.
//go:build linux && (386 || arm || mips || mipsle)
+// +build linux
+// +build 386 arm mips mipsle
package memory
diff --git a/vendor/modernc.org/memory/mmap_linux_64.go b/vendor/modernc.org/memory/mmap_linux_64.go
index 9f65896d..e571af2d 100644
--- a/vendor/modernc.org/memory/mmap_linux_64.go
+++ b/vendor/modernc.org/memory/mmap_linux_64.go
@@ -3,6 +3,8 @@
// license that can be found in the LICENSE-GO file.
//go:build linux && (amd64 || arm64 || mips64 || mips64le || riscv64)
+// +build linux
+// +build amd64 arm64 mips64 mips64le riscv64
package memory
diff --git a/vendor/modernc.org/memory/mmap_netbsd_32.go b/vendor/modernc.org/memory/mmap_netbsd_32.go
index bd1a32c8..d417f359 100644
--- a/vendor/modernc.org/memory/mmap_netbsd_32.go
+++ b/vendor/modernc.org/memory/mmap_netbsd_32.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE-GO file.
//go:build netbsd && 386
+// +build netbsd,386
package memory
diff --git a/vendor/modernc.org/memory/mmap_netbsd_64.go b/vendor/modernc.org/memory/mmap_netbsd_64.go
index ced5dbc9..5c09a7bb 100644
--- a/vendor/modernc.org/memory/mmap_netbsd_64.go
+++ b/vendor/modernc.org/memory/mmap_netbsd_64.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE-GO file.
//go:build netbsd && amd64
+// +build netbsd,amd64
package memory
diff --git a/vendor/modernc.org/memory/mmap_openbsd.go b/vendor/modernc.org/memory/mmap_openbsd.go
new file mode 100644
index 00000000..117cfd9f
--- /dev/null
+++ b/vendor/modernc.org/memory/mmap_openbsd.go
@@ -0,0 +1,19 @@
+// Copyright 2017 The Memory Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build 386 || amd64
+// +build 386 amd64
+
+package memory
+
+import (
+ _ "unsafe"
+)
+
+// Function syscall.mmap for darwin and openbsd calls internal/abi.FuncPCABI0,
+// which is implemented as a compile intrinsic so the code cannot be reused.
+// Using go:linkname directive to link mmapSyscall to syscall.mmap
+
+//go:linkname mmapSyscall syscall.mmap
+func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)