Abstraction, documentation, and uniformity
Created by: ticki
Main problem: The Redox code base is in a state in which, it has relatively low code quality. There are multiple reasons for so:
- Lack of good documentation.
- Lack of uniformity in naming, code style, and so on.
- Low use of abstraction.
- Over use of e.g. heap allocation.
Solution: This PR takes a micro step in the right way.
Changes introduced by this pull request:
- Follow the naming convention in the
syscall
module (in particular, we throw thedo_sys_
prefix out). - Make Context names copy-on-write, effectively reducing the allocations on boot by 40-45%.
- Add #[deny(warnings)] to avoid regression.
- Format the code style through a patched version of rustfmt.
- Add a rustfmt config file.
Drawbacks: None.
TODOs: Lots of things:
- There are "FIXME"s and "TO-never-DOs" all over the place in the kernel. Many of which are already solved, or really ought to be solved.
- There are no proper Rustdoc documentation for most of the internals.
- There are still a long way: We can remove more allocations and avoid more dynamic dispatch.
- Compile a list of things that needs cleanup, abstraction, or full rewrite.
Fixes: No issues.
State: Ready.
Blocking/related: Related to #610 (closed).