summaryrefslogtreecommitdiff
path: root/rust/kernel/sync/set_once.rs
AgeCommit message (Collapse)Author
2025-11-03rust: sync: add `SetOnce`Andreas Hindborg
Introduce the `SetOnce` type, a container that can only be written once. The container uses an internal atomic to synchronize writes to the internal value. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> Tested-by: Daniel Gomez <da.gomez@samsung.com> Signed-off-by: Daniel Gomez <da.gomez@kernel.org>