Merge branch 'master' of github.com:redox-os/kernel

This commit is contained in:
ticki 2016-08-14 00:59:13 +02:00
commit 00f098ee76

View file

@ -7,33 +7,47 @@
//! Syscalls in Redox are often handled by userspace `schemes`. //! Syscalls in Redox are often handled by userspace `schemes`.
//! The essential syscalls in Redox are as follows: //! The essential syscalls in Redox are as follows:
//! //!
//! ## open(path: &str, flags: usize) -> Result<file_descriptor: usize> //! ### Open
//! `open(path: &str, flags: usize) -> Result<file_descriptor: usize>`
//!
//! Open a file, providing a path as a `&str` and flags, defined elsewhere. //! Open a file, providing a path as a `&str` and flags, defined elsewhere.
//! Returns a number, known as a file descriptor, that is passed to other syscalls //! Returns a number, known as a file descriptor, that is passed to other syscalls
//! //!
//! ## close(file_descriptor: usize) -> Result<()> //! ### Close
//! `close(file_descriptor: usize) -> Result<()>`
//!
//! Close a file descriptor, providing the file descriptor from `open` //! Close a file descriptor, providing the file descriptor from `open`
//! Returns an error, `EBADF`, if the file descriptor was not found. //! Returns an error, `EBADF`, if the file descriptor was not found.
//! This potential error is often ignored by userspace //! This potential error is often ignored by userspace
//! //!
//! ## dup(file_descriptor: usize) -> Result<file_descriptor: usize> //! ### Duplicate
//! `dup(file_descriptor: usize) -> Result<file_descriptor: usize>`
//!
//! Duplicate a file descriptor, providing the file descriptor from `open` //! Duplicate a file descriptor, providing the file descriptor from `open`
//! Returns a new file descriptor, or an error //! Returns a new file descriptor, or an error
//! //!
//! ## read(file_descriptor: usize, buffer: &mut [u8]) -> Result<count: usize> //! ### Read
//! `read(file_descriptor: usize, buffer: &mut [u8]) -> Result<count: usize>`
//!
//! Read from a file descriptor, providing the file descriptor from `open` and a mutable buffer //! Read from a file descriptor, providing the file descriptor from `open` and a mutable buffer
//! Returns the number of bytes actually read, or an error //! Returns the number of bytes actually read, or an error
//! //!
//! ## write(file_descriptor: usize, buffer: &[u8]) -> Result<count: usize> //! ### Write
//! `write(file_descriptor: usize, buffer: &[u8]) -> Result<count: usize>`
//!
//! Write to a file descriptor, providing the file descriptor from `open` and a const buffer //! Write to a file descriptor, providing the file descriptor from `open` and a const buffer
//! Returns the number of bytes actually written, or an error //! Returns the number of bytes actually written, or an error
//! //!
//! ## fstat(file_descriptor: usize, stat: &mut Stat) -> Result<()> //! ### Stat
//! `fstat(file_descriptor: usize, stat: &mut Stat) -> Result<()>`
//!
//! Get information from a file descriptor, providing the file descriptor from `open` //! Get information from a file descriptor, providing the file descriptor from `open`
//! and a mutable Stat struct, defined elsewhere. //! and a mutable Stat struct, defined elsewhere.
//! Returns an error if the operation failed //! Returns an error if the operation failed
//! //!
//! ## fpath(file_descriptor: usize, buffer: &mut [u8]) -> Result<count: usize> //! ### Path
//! `fpath(file_descriptor: usize, buffer: &mut [u8]) -> Result<count: usize>`
//!
//! Read the path of a file descriptor, providing the file descriptor from `open` //! Read the path of a file descriptor, providing the file descriptor from `open`
//! and a mutable buffer. The buffer should be 4096 bytes, to ensure that the //! and a mutable buffer. The buffer should be 4096 bytes, to ensure that the
//! entire path will fit. //! entire path will fit.