Expand description
RTSC - Real-time Synchronization Components
Requirements for data synchronization in real-time applications differ from traditional high-load ones. The main difference is that real-time synchronization components must carefully respect and follow the traditional operating-system approach, avoid user-space spin-loops and other busy-waiting techniques (see Channels in Rust. Part 2 where such problems are clearly described).
§Components
This crate provides a pack of real-time-safe synchronization components for various typical and custom use-cases.
- Data Buffer
- Synchronization cells
- Sync/async channels
- Policy-based channels
- Semaphore
- Time tools
§Locking
On Linux the crate uses built-in priority-inheritance [pi::Mutex] implementation and re-exports this module as
locking`.
On other platforms, all components use Mutex/Condvar synchronization primitives
from parking_lot_rt - a real-time
fork of the well-known parking_lot
crate. This is a relatively safe Mutex/RwLock with minimal user-space
spin-waiting. The module is re-exported as locking
as well.
§References
RTSC is a part of RoboPLC project.
Re-exports§
pub use pi as locking;
pub use base_channel::DataChannel;
pub use bma_ts;
Modules§
- Base channel type, allows to build sync channels with a custom storage
- Base async channel type, allows to build async channels with a custom storage
- Data buffer
- Cell synchronization
- Sync channel
- Async channel
- Data policies
- Time-limited operations
- Policy-based sync channel
- Policy-based async channel
- Policy-based deque
- Priority-inverting-safe locking (Linux only)
- Semaphore
- Time tools
Enums§
- Error type
Type Aliases§
- Result type
Derive Macros§
- Automatically implements the
DataDeliveryPolicy
trait for an enum