theseus-os / Theseus

Theseus is a modern OS written from scratch in Rust that explores 𝐢𝐧𝐭𝐫𝐚𝐥𝐢𝐧𝐠𝐮𝐚𝐥 𝐝𝐞𝐬𝐢𝐠𝐧: closing the semantic gap between compiler and hardware by maximally leveraging the power of language safety and affine types. Theseus aims to shift OS responsibilities like resource management into the compiler.
https://www.theseus-os.com/
MIT License
2.92k stars 172 forks source link

Add `replace` and `set` methods for CPU local variables #1015

Closed tsoutsman closed 1 year ago

tsoutsman commented 1 year ago

Only works for CPU-locals under 8 bytes, which happens to be all we need. This implementation doesn't need to disable preemption.

Depends on #1012.

Almost ready, just needs some cleanup (renaming stuff, docs, safety comments, etc.).

Future PRs:

kevinaboos commented 1 year ago

@tsoutsman #1012 has been merged in, thanks!