Add various basic docstrings

This commit is contained in:
Peter Limkilde Svendsen
2024-10-27 23:25:57 +01:00
parent 9ac0226c93
commit 06fec0b843
12 changed files with 29 additions and 0 deletions
+1
View File
@@ -65,6 +65,7 @@ pub fn e_raw(sys: usize) -> Result<usize> {
}
}
/// Linux syscall implementation of the platform abstraction layer.
pub struct Sys;
impl Sys {
+4
View File
@@ -1,3 +1,5 @@
//! Platform abstractions and environment.
use crate::{
error::ResultExt,
io::{self, Read, Write},
@@ -38,9 +40,11 @@ pub use redox_rt::auxv_defs;
use self::types::*;
pub mod types;
/// The global `errno` variable used internally in relibc.
#[thread_local]
pub static ERRNO: Cell<c_int> = Cell::new(0);
/// The `argv` argument available to a program's `main` function.
#[allow(non_upper_case_globals)]
pub static mut argv: *mut *mut c_char = ptr::null_mut();
#[allow(non_upper_case_globals)]
+1
View File
@@ -25,6 +25,7 @@ mod signal;
pub use self::socket::PalSocket;
mod socket;
/// Platform abstraction layer, a platform-agnostic abstraction over syscalls.
pub trait Pal {
fn access(path: CStr, mode: c_int) -> Result<()>;
+1
View File
@@ -74,6 +74,7 @@ macro_rules! path_from_c_str {
use self::{exec::Executable, path::canonicalize};
/// Redox syscall implementation of the platform abstraction layer.
pub struct Sys;
impl Pal for Sys {
+2
View File
@@ -1,3 +1,5 @@
//! C data types for this platform.
use core::i32;
// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable