From 64d688dc4ed53a14e42e387e9f7e9a5d4a23dc4b Mon Sep 17 00:00:00 2001 From: auronandace Date: Sun, 7 Dec 2025 17:01:51 +0000 Subject: [PATCH] update and add spec links to sys_utsname and sys_select --- src/header/sys_select/mod.rs | 7 ++++++- src/header/sys_utsname/mod.rs | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/header/sys_select/mod.rs b/src/header/sys_select/mod.rs index 2ffc823c1c..51e8901351 100644 --- a/src/header/sys_select/mod.rs +++ b/src/header/sys_select/mod.rs @@ -1,4 +1,6 @@ -//! sys/select.h implementation +//! `sys/select.h` implementation. +//! +//! See . use core::mem; @@ -19,9 +21,11 @@ use crate::{ // fd_set is also defined in C because cbindgen is incompatible with mem::size_of booo +/// See . pub const FD_SETSIZE: usize = 1024; type bitset = BitSet<[u64; FD_SETSIZE / (8 * mem::size_of::())]>; +/// See . #[repr(C)] pub struct fd_set { pub fds_bits: bitset, @@ -161,6 +165,7 @@ pub fn select_epoll( count } +/// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn select( nfds: c_int, diff --git a/src/header/sys_utsname/mod.rs b/src/header/sys_utsname/mod.rs index 2ca93e38b5..da72961bd8 100644 --- a/src/header/sys_utsname/mod.rs +++ b/src/header/sys_utsname/mod.rs @@ -1,4 +1,6 @@ -//! sys/utsname implementation, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysutsname.h.html +//! `sys/utsname.h` implementation. +//! +//! See . use crate::{ error::ResultExt, @@ -8,6 +10,7 @@ use crate::{ pub const UTSLENGTH: usize = 65; +/// See . #[repr(C)] #[derive(Clone, Copy, Debug, OutProject)] pub struct utsname { @@ -19,6 +22,7 @@ pub struct utsname { pub domainname: [c_char; UTSLENGTH], } +/// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn uname(uts: *mut utsname) -> c_int { Sys::uname(Out::nonnull(uts))