Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
redox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pirson Bethancourt
redox
Commits
2d3f08ae
Commit
2d3f08ae
authored
8 years ago
by
ticki
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:redox-os/kernel
parents
8a8f31cb
b41c6be0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib.rs
+36
-0
36 additions, 0 deletions
src/lib.rs
with
36 additions
and
0 deletions
src/lib.rs
+
36
−
0
View file @
2d3f08ae
...
...
@@ -2,3 +2,39 @@
//!
//! The Redox OS Kernel is a hybrid kernel that supports X86 systems and
//! provides Unix-like syscalls for primarily Rust applications
//!
//! ## Syscalls
//! Syscalls in Redox are often handled by userspace `schemes`.
//! The essential syscalls in Redox are as follows:
//!
//! ## open(path: &str, flags: usize) -> Result<file_descriptor: usize>
//! 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
//!
//! ## close(file_descriptor: usize) -> Result<()>
//! Close a file descriptor, providing the file descriptor from `open`
//! Returns an error, `EBADF`, if the file descriptor was not found.
//! This potential error is often ignored by userspace
//!
//! ## dup(file_descriptor: usize) -> Result<file_descriptor: usize>
//! Duplicate a file descriptor, providing the file descriptor from `open`
//! Returns a new file descriptor, or an error
//!
//! ## 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
//! Returns the number of bytes actually read, or an error
//!
//! ## write(file_descriptor: usize, buffer: &[u8]) -> Result<count: usize>
//! 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
//!
//! ## fstat(file_descriptor: usize, stat: &mut Stat) -> Result<()>
//! Get information from a file descriptor, providing the file descriptor from `open`
//! and a mutable Stat struct, defined elsewhere.
//! Returns an error if the operation failed
//!
//! ## fpath(file_descriptor: usize, buffer: &mut [u8]) -> Result<count: usize>
//! 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
//! entire path will fit.
//! Returns the number of bytes actually read, or an error
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment