mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 16:47:27 -04:00
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: e7b4680e63a774209ae5e40765492858871fbe13 GitHub-Pull-Request: golang/sys#186 Reviewed-on: https://go-review.googlesource.com/c/sys/+/569359 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
360f961f89
commit
4be02d3543
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
|
//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|||||||
@@ -1520,6 +1520,14 @@ func (m *mmapper) Munmap(data []byte) (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
|
||||||
|
return mapper.Mmap(fd, offset, length, prot, flags)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Munmap(b []byte) (err error) {
|
||||||
|
return mapper.Munmap(b)
|
||||||
|
}
|
||||||
|
|
||||||
func Read(fd int, p []byte) (n int, err error) {
|
func Read(fd int, p []byte) (n int, err error) {
|
||||||
n, err = read(fd, p)
|
n, err = read(fd, p)
|
||||||
if raceenabled {
|
if raceenabled {
|
||||||
|
|||||||
Reference in New Issue
Block a user