Skip to content

Commit b411fb7

Browse files
committed
Updated the docs for preadv and pwritev
1 parent 6550bd0 commit b411fb7

File tree

1 file changed

+10
-6
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+10
-6
lines changed

library/std/src/sys/pal/unix/fd.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,15 @@ impl FileDesc {
250250
}
251251
}
252252

253-
// We support old MacOS, iOS, watchOS, tvOS and visionOS versions that do not have `preadv`.
254-
// There is no `syscall` possible in these platform for following apple versions:
253+
// We support old MacOS, iOS, watchOS, tvOS and visionOS. `preadv` was added in the following
254+
// Apple OS versions:
255255
// ios 14.0
256256
// tvos 14.0
257257
// macos 11.0
258258
// watchos 7.0
259-
// visionos 1.0
259+
//
260+
// These versions may be newer than the minimum supported versions of OS's we support so we must
261+
// use "weak" linking.
260262
#[cfg(target_vendor = "apple")]
261263
pub fn read_vectored_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result<usize> {
262264
super::weak::weak!(fn preadv(libc::c_int, *const libc::iovec, libc::c_int, off64_t) -> isize);
@@ -425,13 +427,15 @@ impl FileDesc {
425427
}
426428
}
427429

428-
// We support old MacOS, iOS, watchOS, tvOS and visionOS versions that do not have `pwritev`.
429-
// There is no `syscall` possible in these platform for following apple versions:
430+
// We support old MacOS, iOS, watchOS, tvOS and visionOS. `pwritev` was added in the following
431+
// Apple OS versions:
430432
// ios 14.0
431433
// tvos 14.0
432434
// macos 11.0
433435
// watchos 7.0
434-
// visionos 1.0
436+
//
437+
// These versions may be newer than the minimum supported versions of OS's we support so we must
438+
// use "weak" linking.
435439
#[cfg(target_vendor = "apple")]
436440
pub fn write_vectored_at(&self, bufs: &[IoSlice<'_>], offset: u64) -> io::Result<usize> {
437441
super::weak::weak!(fn pwritev(libc::c_int, *const libc::iovec, libc::c_int, off64_t) -> isize);

0 commit comments

Comments
 (0)