From 313a2074d75dd2611f3c37c44542c54afcbe8815 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 17 Dec 2018 01:42:53 +0100 Subject: [PATCH 1/2] make docs.rs build docs with +timer-queue --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d96923b140..55d3fa85a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,6 +57,9 @@ timer-queue = ["cortex-m-rtfm-macros/timer-queue"] compiletest_rs = "0.3.16" tempdir = "0.3.7" +[package.metadata.docs.rs] +features = ["timer-queue"] + [profile.release] codegen-units = 1 lto = true From 7de9687dfa5ede32bff268c9b9b712939dc7f5c9 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 17 Dec 2018 01:43:12 +0100 Subject: [PATCH 2/2] note that entering / leaving a critical section is always constant time --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ba60078d7d..cb3389b0a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -253,7 +253,8 @@ impl U32Ext for u32 { /// /// In RTFM, locks are implemented as critical sections that prevent other tasks from *starting*. /// These critical sections are implemented by temporarily increasing the dynamic priority (see -/// [BASEPRI]) of the current context. +/// [BASEPRI]) of the current context. Entering and leaving these critical sections is always done +/// in constant time (a few instructions). /// /// [BASEPRI]: https://developer.arm.com/products/architecture/cpu-architecture/m-profile/docs/100701/latest/special-purpose-mask-registers pub trait Mutex {