summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 615086d..2358ba2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,7 @@
#![warn(clippy::pedantic)]
#![warn(clippy::nursery)]
#![allow(clippy::module_name_repetitions)]
+#![allow(clippy::declare_interior_mutable_const)]
use std::any::type_name;
use std::fmt::{self, Debug};
@@ -10,11 +11,13 @@ use once_cell::sync::Lazy;
use thread_local::ThreadLocal;
mod lock;
-pub mod mutex;
+mod mutex;
use lock::{Key, Lock};
+use mutex::RawSpin;
-pub use mutex::Mutex;
+pub use mutex::{Mutex, MutexGuard};
+pub type SpinLock<T> = Mutex<RawSpin, T>;
static KEY: Lazy<ThreadLocal<Lock>> = Lazy::new(ThreadLocal::new);