#![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "README.md" ) ) ]
#![deny(missing_docs)]
pub mod buf;
pub mod cell;
pub mod channel;
pub mod channel_async;
pub mod data_policy;
pub mod event_map;
#[cfg(target_os = "linux")]
pub mod pi;
#[cfg(not(target_os = "linux"))]
pub mod pi {
pub type Mutex<T> = parking_lot_rt::Mutex<T>;
pub type Condvar = parking_lot_rt::Condvar;
pub type RawMutex = parking_lot_rt::RawMutex;
pub type MutexGuard<'a, T> = parking_lot_rt::MutexGuard<'a, T>;
}
pub mod policy_channel;
pub mod policy_channel_async;
#[cfg(not(target_os = "linux"))]
pub use parking_lot_rt as locking;
#[cfg(target_os = "linux")]
pub use pi as locking;
pub mod semaphore;
pub mod system;
pub mod time;
pub use bma_ts;
pub mod base_channel;
pub mod base_channel_async;
pub mod condvar_api;
pub mod ops;
pub mod pdeque;
pub mod thread_rt;
pub use base_channel::DataChannel;
pub use rtsc_derive::DataPolicy;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("channel full")]
ChannelFull,
#[error("channel message skipped")]
ChannelSkipped,
#[error("channel closed")]
ChannelClosed,
#[error("channel closed")]
ChannelEmpty,
#[error("not implemented")]
Unimplemented,
#[error("timed out")]
Timeout,
#[error("Invalid data")]
InvalidData(String),
#[error("operation failed: {0}")]
Failed(String),
#[error("access denied")]
AccessDenied,
#[error("I/O error: {0}")]
IO(#[from] std::io::Error),
#[error("CPU affinity set error: {0}")]
RTSchedSetAffinity(String),
#[error("Real-time priority set error: {0}")]
RTSchedSetScheduler(String),
}
pub type Result<T> = std::result::Result<T, Error>;