aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-12-17 01:43:12 +0100
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-12-17 01:43:12 +0100
commit7de9687dfa5ede32bff268c9b9b712939dc7f5c9 (patch)
treeb838457c446fc608ed8a6ab457f2d77f320128df /src
parent313a2074d75dd2611f3c37c44542c54afcbe8815 (diff)
downloadrtic-7de9687dfa5ede32bff268c9b9b712939dc7f5c9.tar.gz
rtic-7de9687dfa5ede32bff268c9b9b712939dc7f5c9.tar.zst
rtic-7de9687dfa5ede32bff268c9b9b712939dc7f5c9.zip
note that entering / leaving a critical section is always constant time
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ba60078d..cb3389b0 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 {