#[cfg(target_os = "linux")]
mod driver;
#[cfg(target_os = "linux")]
mod future;
#[cfg(target_os = "linux")]
mod requests;
#[cfg(target_os = "linux")]
mod store;
mod sys;
#[cfg(target_os = "linux")]
pub use store::UringPageStore;
pub use sys::is_uring_available;
#[cfg(target_os = "linux")]
pub fn init_uring_config(queue_depth: usize, thread_count: usize) {
driver::init_uring_config(queue_depth, thread_count);
}
#[cfg(not(target_os = "linux"))]
#[allow(unused_variables)]
pub fn init_uring_config(queue_depth: usize, thread_count: usize) {}
use crate::error::Error;
#[cfg_attr(not(target_os = "linux"), allow(dead_code))]
const NUM_BUCKETS: u64 = 1000;
#[cfg_attr(not(target_os = "linux"), allow(dead_code))]
fn hash_file_id(file_id: &str) -> u64 {
xxhash_rust::xxh3::xxh3_64(file_id.as_bytes())
}
#[cfg_attr(not(target_os = "linux"), allow(dead_code))]
fn io_error(message: impl Into<String>, e: std::io::Error) -> Error {
Error::Internal {
message: message.into(),
source: Some(Box::new(e)),
}
}