diff options
| author | Christian Cunningham <c@localhost> | 2022-08-26 18:13:02 -0700 |
|---|---|---|
| committer | Christian Cunningham <c@localhost> | 2022-08-26 18:13:02 -0700 |
| commit | 99ab7eadbc72eb0dc2dd776b83373a4b7035f3ea (patch) | |
| tree | 8d54b2124305b59e88e3b1d65517824b13f82211 /src/util | |
| parent | d50d0fece79a59ac1148f1c8fb448b62aab32094 (diff) | |
Revert lock type
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/fifo_queue.rs | 8 | ||||
| -rw-r--r-- | src/util/lifo_queue.rs | 8 |
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 } } } |
