mod condvar;
mod core;
mod mutex;
mod rwlock;
#[cfg(feature = "logging-and-visualization")]
mod showcase;
mod stress;
mod thread;
use crate::core::locks::mutex::MutexGuard;
use std::cell::RefCell;
use std::collections::HashMap;
use std::ffi::c_void;
use std::os::raw::c_char;
use std::sync::atomic::AtomicBool;
thread_local! {
static FFI_GUARD: RefCell<HashMap<*mut c_void, MutexGuard<'static, ()>>> = RefCell::new(HashMap::new());
}
static INITIALIZED: AtomicBool = AtomicBool::new(false);
static mut DEADLOCK_DETECTED: AtomicBool = AtomicBool::new(false);
static IS_LOGGING_ENABLED: AtomicBool = AtomicBool::new(false);
static mut DEADLOCK_CALLBACK: Option<extern "C" fn(*const c_char)> = None;
#[cfg(feature = "stress-test")]
use crate::StressConfig;
#[cfg(feature = "stress-test")]
use std::sync::atomic::AtomicU8;
#[cfg(feature = "stress-test")]
static STRESS_MODE: AtomicU8 = AtomicU8::new(0); #[cfg(feature = "stress-test")]
static mut STRESS_CONFIG: Option<StressConfig> = None;