rtic-time: Docs

This commit is contained in:
datdenkikniet 2023-04-13 18:42:48 +02:00
parent dcbd7ce970
commit 822eaabec0
3 changed files with 9 additions and 5 deletions

View file

@ -1,4 +1,7 @@
//! Crate //! Time-related traits & structs.
//!
//! This crate contains basic definitions and utilities that can be used
//! to keep track of time.
#![no_std] #![no_std]
#![deny(missing_docs)] #![deny(missing_docs)]

View file

@ -1,11 +1,12 @@
//! ...
use core::marker::PhantomPinned; use core::marker::PhantomPinned;
use core::pin::Pin; use core::pin::Pin;
use core::sync::atomic::{AtomicPtr, Ordering}; use core::sync::atomic::{AtomicPtr, Ordering};
use critical_section as cs; use critical_section as cs;
/// A sorted linked list for the timer queue. /// An atomic sorted linked list for the timer queue.
///
/// Atomicity is guaranteed using very short [`critical_section`]s, so this list is _not_
/// lock free, but it will not deadlock.
pub(crate) struct LinkedList<T> { pub(crate) struct LinkedList<T> {
head: AtomicPtr<Link<T>>, head: AtomicPtr<Link<T>>,
} }

View file

@ -1,4 +1,4 @@
//! ... //! A monotonic clock / counter definition.
/// # A monotonic clock / counter definition. /// # A monotonic clock / counter definition.
/// ///