From 822eaabec01441b626ae6874aa9897843b9a69a1 Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Thu, 13 Apr 2023 18:42:48 +0200 Subject: [PATCH] rtic-time: Docs --- rtic-time/src/lib.rs | 5 ++++- rtic-time/src/linked_list.rs | 7 ++++--- rtic-time/src/monotonic.rs | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/rtic-time/src/lib.rs b/rtic-time/src/lib.rs index 1ed1e9d6ce..f0135b7517 100644 --- a/rtic-time/src/lib.rs +++ b/rtic-time/src/lib.rs @@ -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] #![deny(missing_docs)] diff --git a/rtic-time/src/linked_list.rs b/rtic-time/src/linked_list.rs index c2a99676b2..b84b92db57 100644 --- a/rtic-time/src/linked_list.rs +++ b/rtic-time/src/linked_list.rs @@ -1,11 +1,12 @@ -//! ... - use core::marker::PhantomPinned; use core::pin::Pin; use core::sync::atomic::{AtomicPtr, Ordering}; 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 { head: AtomicPtr>, } diff --git a/rtic-time/src/monotonic.rs b/rtic-time/src/monotonic.rs index 513cc07bb8..ad79bf2053 100644 --- a/rtic-time/src/monotonic.rs +++ b/rtic-time/src/monotonic.rs @@ -1,4 +1,4 @@ -//! ... +//! A monotonic clock / counter definition. /// # A monotonic clock / counter definition. ///