-
Notifications
You must be signed in to change notification settings - Fork 18k
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
x/sys/unix: add support for vectorized ("scatter/gather") IO syscalls on Darwin #64710
Comments
cc @golang/darwin |
Change https://go.dev/cl/548795 mentions this issue: |
Why just Darwin? p{read,write}v have been supported on Linux and various BSDs for a while. Ideally the sys interface would have implementations for all platforms that support it, even if the macOS implementation needs an additional compatibility check. [Update: I now see that we have a Linux implementation already. But my point is that the proposal should cover the API change, and implementations for all platforms can follow at their own pace if they conform to the approved proposal.] |
Hm, yeah, @adonovan I think you are right. The goal should be to implement it on all platforms supported, but I agree on these implementations better coming in at their own pace. |
Yes, there is no need for a proposal to add new system calls for a GOOS that are the same as existing system calls for a different GOOS. |
@gopherbot remove NeedsFix |
@ianlancetaylor, Hoping I'm using these labels right. @gopherbot add PendingFix. |
@gopherbot add FixPending |
Proposal Details
The following syscalls could be supported on modern OSX versions (Darwin 11 and newer)
unix.Readv(fd int, iovs [][]byte) (n int, err error)
unix.Preadv(fd int, iovs [][]byte, offset int64) (n int, err error)
unix.Writev(fd int, iovs [][]byte) (n int, err error)
unix.Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error)
I think https://go-review.googlesource.com/c/sys/+/548795 contains everything needed to implement this on Darwin.
In cases where the version is too old, the public functions in
unix
would simply returnENOSYS
instead of running into adyld
error due to trying to jump to a function that doesn't exist.The text was updated successfully, but these errors were encountered: