From 44cd0971b1bcbe6286e658f5fdd3851cdee0604c Mon Sep 17 00:00:00 2001 From: auronandace Date: Sat, 29 Nov 2025 17:48:56 +0000 Subject: [PATCH] update header spec reference and add spec references to functions --- src/header/sys_uio/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/header/sys_uio/mod.rs b/src/header/sys_uio/mod.rs index ae3cabc155..8d48447c7d 100644 --- a/src/header/sys_uio/mod.rs +++ b/src/header/sys_uio/mod.rs @@ -1,4 +1,6 @@ -//! sys/uio implementation for Redox, following http://pubs.opengroup.org/onlinepubs/007904875/basedefs/sys/uio.h.html +//! `sys/uio.h` implementation. +//! +//! See . use alloc::vec::Vec; use core::slice; @@ -10,6 +12,7 @@ use crate::{ pub const IOV_MAX: c_int = 1024; +/// See . #[repr(C)] #[derive(Debug, CheckVsLibcCrate)] pub struct iovec { @@ -40,6 +43,7 @@ unsafe fn scatter(iovs: &[iovec], vec: Vec) { } } +/// Non-POSIX, see . #[unsafe(no_mangle)] pub unsafe extern "C" fn preadv( fd: c_int, @@ -62,6 +66,7 @@ pub unsafe extern "C" fn preadv( ret } +/// Non-POSIX, see . #[unsafe(no_mangle)] pub unsafe extern "C" fn pwritev( fd: c_int, @@ -80,6 +85,7 @@ pub unsafe extern "C" fn pwritev( unistd::pwrite(fd, vec.as_ptr() as *const c_void, vec.len(), offset) } +/// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn readv(fd: c_int, iov: *const iovec, iovcnt: c_int) -> ssize_t { if iovcnt < 0 || iovcnt > IOV_MAX { @@ -97,6 +103,7 @@ pub unsafe extern "C" fn readv(fd: c_int, iov: *const iovec, iovcnt: c_int) -> s ret } +/// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn writev(fd: c_int, iov: *const iovec, iovcnt: c_int) -> ssize_t { if iovcnt < 0 || iovcnt > IOV_MAX {