rtic-common: docs

This commit is contained in:
datdenkikniet 2023-04-13 18:49:47 +02:00
parent 822eaabec0
commit 068eea8425
2 changed files with 6 additions and 3 deletions

View file

@ -1,4 +1,4 @@
//! Crate //! Utility structs that can be useful to other subcrates.
#![no_std] #![no_std]
#![deny(missing_docs)] #![deny(missing_docs)]

View file

@ -1,4 +1,4 @@
//! ... //! A wait queue implementation using a doubly linked list.
use core::marker::PhantomPinned; use core::marker::PhantomPinned;
use core::pin::Pin; use core::pin::Pin;
@ -10,7 +10,10 @@ use critical_section as cs;
/// A helper definition of a wait queue. /// A helper definition of a wait queue.
pub type WaitQueue = LinkedList<Waker>; 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> { pub struct LinkedList<T> {
head: AtomicPtr<Link<T>>, // UnsafeCell<*mut Link<T>> head: AtomicPtr<Link<T>>, // UnsafeCell<*mut Link<T>>
tail: AtomicPtr<Link<T>>, tail: AtomicPtr<Link<T>>,