-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syscall: add Mmap for Solaris and Illumos? #52875
Comments
Although the syscall package is frozen, I think that this kind of addition is OK since it matches other targets. |
I too think this is OK. There have been similar additions in the past when a particular function was present in |
Change https://go.dev/cl/413374 mentions this issue: |
Change https://go.dev/cl/413375 mentions this issue: |
They exist on all other Unix ports, define them on GOOS=solaris as well. Fixes golang#52875 Change-Id: I7285156b3b48ce12fbcc6d1d88865540a5c51a21 Reviewed-on: https://go-review.googlesource.com/c/go/+/413374 Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> Reviewed-by: Than McIntosh <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
Now that syscall.Mmap is defined on solaris (see CL 413374), use it in mmapFile like on other Unix ports. For #52875 Change-Id: Ic5c5a84da8613f0c6dc947a52b7fcca50af43d79 Reviewed-on: https://go-review.googlesource.com/c/go/+/413375 Run-TryBot: Tobias Klauser <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
Change https://go.dev/cl/430496 mentions this issue: |
CL 413374 added syscall.Mmap on solaris. Use it in cmd/compile and cmd/link if the bootstrap toolchain is Go ≥ 1.20. For #52875 For #54265 Change-Id: I9a0534bf97926eecf0c6f1f9218e855344ba158f Reviewed-on: https://go-review.googlesource.com/c/go/+/430496 Reviewed-by: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> Run-TryBot: Tobias Klauser <[email protected]>
Solaris supports an
mmap
syscall.x/sys/unix.Mmap
is defined for GOOS=solaris, andruntime.mmap
appears to use the system call as well.And yet, even though
Mmap
exists on Solaris andsyscall.Mmap
exists on most Go Unix ports, for some reasonsyscall.Mmap
does not appear to be defined forGOOS=solaris
orGOOS=illumos
.We're looking at possibly using
syscall.Mmap
incmd/go
in https://go.dev/cl/403975 (CC @matloob). Would it make sense to addsyscall.Mmap
,syscall.Munmap
, and related constants for Solaris and Illumos for consistency with other platforms?(CC @ianlancetaylor @tklauser @golang/solaris @golang/illumos)
The text was updated successfully, but these errors were encountered: