diff --git a/src/header/sys_select/mod.rs b/src/header/sys_select/mod.rs index 2ffc823c1c..8124f211a9 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; @@ -14,14 +16,16 @@ use crate::{ }, sys_time::timeval, }, - platform::{self, types::*}, + platform::{self, types::c_int}, }; // 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..8751727430 100644 --- a/src/header/sys_utsname/mod.rs +++ b/src/header/sys_utsname/mod.rs @@ -1,13 +1,19 @@ -//! sys/utsname implementation, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysutsname.h.html +//! `sys/utsname.h` implementation. +//! +//! See . use crate::{ error::ResultExt, out::Out, - platform::{Pal, Sys, types::*}, + platform::{ + Pal, Sys, + types::{c_char, c_int}, + }, }; pub const UTSLENGTH: usize = 65; +/// See . #[repr(C)] #[derive(Clone, Copy, Debug, OutProject)] pub struct utsname { @@ -19,6 +25,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))