summaryrefslogtreecommitdiff
path: root/src/util/lifo_queue.rs
diff options
context:
space:
mode:
authorChristian Cunningham <c@localhost>2022-08-26 18:13:02 -0700
committerChristian Cunningham <c@localhost>2022-08-26 18:13:02 -0700
commit99ab7eadbc72eb0dc2dd776b83373a4b7035f3ea (patch)
tree8d54b2124305b59e88e3b1d65517824b13f82211 /src/util/lifo_queue.rs
parentd50d0fece79a59ac1148f1c8fb448b62aab32094 (diff)
Revert lock type
Diffstat (limited to 'src/util/lifo_queue.rs')
-rw-r--r--src/util/lifo_queue.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/lifo_queue.rs b/src/util/lifo_queue.rs
index 3a08076..d63ca6e 100644
--- a/src/util/lifo_queue.rs
+++ b/src/util/lifo_queue.rs
@@ -2,7 +2,7 @@
//!
//! Queue structure
use crate::sync::interface::Mutex;
-use crate::sync::SpinLock;
+use crate::sync::NullLock;
use crate::util::node::*;
use core::fmt;
use core::fmt::{Debug, Formatter};
@@ -20,7 +20,7 @@ macro_rules! init_lifo_queue {
(@gen [$name:tt,$size:tt,$default:tt,$type:ty,$doc:expr]) => {
#[doc = $doc]
#[link_section = ".data.alloc"]
- pub static $name: LifoQueue<'static, $type, {$size+1}> = LifoQueue::new(SpinLock::new([Node::new($default); {$size+1}]));
+ pub static $name: LifoQueue<'static, $type, {$size+1}> = LifoQueue::new(NullLock::new([Node::new($default); {$size+1}]));
};
}
@@ -31,12 +31,12 @@ pub struct LifoQueue<'a, T: Sized, const COUNT: usize> {
/// # Synchronized Pool of items
///
/// Stores synchronization wrapper around the data pool
- pub inner: SpinLock<[Node<'a, T>; COUNT]>,
+ pub inner: NullLock<[Node<'a, T>; COUNT]>,
}
impl<'a, T: Sized, const COUNT: usize> LifoQueue<'a, T, COUNT> {
/// # Create new Lifo Queue
- pub const fn new(initial: SpinLock<[Node<'a, T>; COUNT]>) -> Self {
+ pub const fn new(initial: NullLock<[Node<'a, T>; COUNT]>) -> Self {
Self { inner: initial }
}
}