Review of a "PriorityCell" for UB - intended to safely share state between main and interrupt handlers
โ Rust ๐ 2025-11-28 ๐ค surdeus ๐๏ธ 1We're currently working on an IEEE 802.15.4 TSCH protocol implementation. In that context I'm trying to flesh out some experimental primitives.
One of those tries to address the evergreen problem of how to safely and efficiently share resources between thread context and handlers running at different priorities: x/src/util/sync/priority_cell.rs at main ยท fg-cfh/x ยท GitHub
The "PriorityCell" primitive is special in that it intends to enable fine-grained, lock-free sharing w/o disabling interrupts or other heavy synchronization mechanisms, similarly to an MPMC one-shot channel, but heavily optimized for single-core ARMv7/8.
Do you think that this "PriorityCell" is safe?
(Please disregard that "x" name - it intends nothing, it only documents my lack of creativity.)
1 post - 1 participant
๐ท๏ธ Rust_feed