Add various basic docstrings
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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<()>;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user