-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This replaces the five-year-old lilos::list module with a new implementation derived from my "lilist" sketch. Compared to the original, the new list has the following advantages: - Its implementation is shorter. - Its API is simpler. - It no longer requires two-phase init, and so things using it _also_ don't require two-phase init. - It can be tested under Miri to catch pointer abuses. - It's exposed as a separate crate, which means I can update it without having to rev the OS.
- Loading branch information
Showing
25 changed files
with
1,174 additions
and
361 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "lilos-list" | ||
version = "0.1.0" | ||
authors = ["Cliff L. Biffle <code@cliffle.com>"] | ||
description = "Allocation-free intrusive doubly-linked wait queues for lilos." | ||
keywords = ["async", "embedded", "os"] | ||
categories = ["embedded", "no-std"] | ||
readme = "README.mkdn" | ||
|
||
edition.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
rust-version.workspace = true | ||
|
||
[dependencies] | ||
pin-project.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Allocation-free doubly-linked intrusive lists | ||
|
||
This is the list type used to implement timer lists and wait queues in | ||
[`lilos`]. It takes an unusual approach to implementing a sound doubly-linked | ||
intrusive list in Rust without allocation, which is otherwise quite difficult: | ||
it presents a different API that's easier to make sound. | ||
|
||
This data structure can be built for any platform, and has tests that can run | ||
both hosted and under Miri (to check for pointer abuses). | ||
|
||
See the rustdoc for more details. | ||
|
||
## Versioning | ||
|
||
It's not important for applications or custom synchronization primitives to use | ||
_exactly_ the same version of `lilos-list` as `lilos` does internally. Having | ||
multiple versions linked into a single binary will work fine. (However, it will | ||
take somewhat less space in flash if you can arrange to use the same version.) | ||
|
||
`lilos-list` is versioned separately from the OS API and will likely go through | ||
major versions faster than the rest of the OS. | ||
|
||
[`lilos`]: https://docs.rs/lilos/latest/lilos/ |
Oops, something went wrong.