diff options
| author | datdenkikniet <jcdra1@gmail.com> | 2023-04-13 18:49:47 +0200 |
|---|---|---|
| committer | datdenkikniet <jcdra1@gmail.com> | 2023-04-15 19:19:49 +0200 |
| commit | 068eea84256f5b8b6152ca0ae1ad46301fe64b12 (patch) | |
| tree | 3f9e40bd4abf170dd9059f92431c264af3707e39 /rtic-common/src | |
| parent | 822eaabec01441b626ae6874aa9897843b9a69a1 (diff) | |
rtic-common: docs
Diffstat (limited to 'rtic-common/src')
| -rw-r--r-- | rtic-common/src/lib.rs | 2 | ||||
| -rw-r--r-- | rtic-common/src/wait_queue.rs | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/rtic-common/src/lib.rs b/rtic-common/src/lib.rs index 03d0306..2dd9673 100644 --- a/rtic-common/src/lib.rs +++ b/rtic-common/src/lib.rs @@ -1,4 +1,4 @@ -//! Crate +//! Utility structs that can be useful to other subcrates. #![no_std] #![deny(missing_docs)] diff --git a/rtic-common/src/wait_queue.rs b/rtic-common/src/wait_queue.rs index b1aa775..3056672 100644 --- a/rtic-common/src/wait_queue.rs +++ b/rtic-common/src/wait_queue.rs @@ -1,4 +1,4 @@ -//! ... +//! A wait queue implementation using a doubly linked list. use core::marker::PhantomPinned; use core::pin::Pin; @@ -10,7 +10,10 @@ use critical_section as cs; /// A helper definition of a wait queue. pub type WaitQueue = LinkedList<Waker>; -/// A FIFO linked list for a wait queue. +/// An atomic, doubly linked, FIFO list for a wait queue. +/// +/// Atomicity is guaranteed by short [`critical_section`]s, so this list is _not_ lock free, +/// but it will not deadlock. pub struct LinkedList<T> { head: AtomicPtr<Link<T>>, // UnsafeCell<*mut Link<T>> tail: AtomicPtr<Link<T>>, |
