Skip to content

Commit

Permalink
unix: expose mmap calls on z/OS
Browse files Browse the repository at this point in the history
  • Loading branch information
MacMalainey committed Feb 29, 2024
1 parent 360f961 commit e7b4680
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion unix/mmap_nomremap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// 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

Expand Down
8 changes: 8 additions & 0 deletions unix/syscall_zos_s390x.go
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,14 @@ func (m *mmapper) Munmap(data []byte) (err error) {
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) {
n, err = read(fd, p)
if raceenabled {
Expand Down

0 comments on commit e7b4680

Please sign in to comment.