Skip to content

Commit 4be02d3

Browse files
MacMalaineygopherbot
authored andcommitted
unix: expose mmap calls on z/OS
The calls `Mmap` and `Munmap` were removed for z/OS. Syscall removed occurred in: 508397 This change exposes them in a z/OS specific file (to remove the accidental deletion of them in future refactors of the APIs for `unix-like` OSes). Change-Id: Ice0cabfb4547cab2ffa7130b7c26d9cc38233afe GitHub-Last-Rev: e7b4680 GitHub-Pull-Request: #186 Reviewed-on: https://go-review.googlesource.com/c/sys/+/569359 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 360f961 commit 4be02d3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

unix/mmap_nomremap.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
5+
//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos
66

77
package unix
88

unix/syscall_zos_s390x.go

+8
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,14 @@ func (m *mmapper) Munmap(data []byte) (err error) {
15201520
return nil
15211521
}
15221522

1523+
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
1524+
return mapper.Mmap(fd, offset, length, prot, flags)
1525+
}
1526+
1527+
func Munmap(b []byte) (err error) {
1528+
return mapper.Munmap(b)
1529+
}
1530+
15231531
func Read(fd int, p []byte) (n int, err error) {
15241532
n, err = read(fd, p)
15251533
if raceenabled {

0 commit comments

Comments
 (0)