Skip to content

Commit eec435b

Browse files
authored
Merge pull request #133 from mkroening/hermit-sync
Add a section on hermit-sync
2 parents 9c20126 + d4be323 commit eec435b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

content/this-month/2022-11/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,29 @@ The initial nightlies containing the prebuilt UEFI targets revealed some issues
113113
Finally, we [changed the C compiler for the UEFI targets from gcc to clang](https://github.com/rust-lang/rust/pull/104622), which resolved some linker problems.
114114
As of the 2022-11-22 nightly, the three UEFI targets should be fully usable, which means you no longer need to use the unstable `-Zbuild-std` feature.
115115

116+
### [`hermitcore/hermit-sync`](https://github.com/hermitcore/hermit-sync)
117+
<span class="maintainers">(Section written by [@mkroening](https://github.com/mkroening))</span>
118+
119+
While working on the [`libhermit-rs`] kernel, I moved the synchronization primitives targeted at kernel development into a separate crate: [`hermit-sync`].
120+
Whilst I was there, I also enhanced the code and made it independent from libhermit, so the code can now be used in other projects as well; at least x86_64 and aarch64 ones for the moment.
121+
122+
The crate contains the following features:
123+
124+
* a function for running a closure without interrupts
125+
* a simple spinlock with exponential backoff
126+
* a fair ticket lock with exponential backoff
127+
* `OnceCell` and `Lazy` based on [`generic_once_cell`] (another recent project of mine)
128+
129+
All of these primitives are available with and without interrupt safety.
130+
See the [API docs] for more details.
131+
132+
Any feedback is very welcome of course.
133+
134+
[`libhermit-rs`]: https://github.com/hermitcore/libhermit-rs
135+
[`hermit-sync`]: https://github.com/hermitcore/hermit-sync
136+
[`generic_once_cell`]: https://github.com/mkroening/generic_once_cell
137+
[API docs]: https://docs.rs/hermit-sync
138+
116139
## Other News
117140

118141
<!--

0 commit comments

Comments
 (0)