summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/fifo_queue.rs8
-rw-r--r--src/util/lifo_queue.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/util/fifo_queue.rs b/src/util/fifo_queue.rs
index 9c0874d..779bc9d 100644
--- a/src/util/fifo_queue.rs
+++ b/src/util/fifo_queue.rs
@@ -2,7 +2,7 @@
//!
//! Provides the FIFO queue structure for allocations
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_fifo_queue {
(@gen [$name:tt,$size:tt,$default:tt,$type:ty,$doc:expr]) => {
#[doc = $doc]
#[link_section = ".data.alloc"]
- pub static $name: FifoQueue<'static, $type, {$size+1}> = FifoQueue::new(SpinLock::new([Node::new($default); {$size+1}]));
+ pub static $name: FifoQueue<'static, $type, {$size+1}> = FifoQueue::new(NullLock::new([Node::new($default); {$size+1}]));
};
}
@@ -31,12 +31,12 @@ pub struct FifoQueue<'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> FifoQueue<'a, T, COUNT> {
/// # Create new Fifo 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 }
}
}
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 }
}
}