Skip to content

Commit a469645

Browse files
committed
fix documentation
1 parent 63c0370 commit a469645

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/mpmc.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! A fixed capacity Multiple-Producer Multiple-Consumer (MPMC) lock-free queue
22
//!
3-
//! NOTE: This module is not available on targets that do *not* support CAS operations, e.g. ARMv6-M
3+
//! NOTE: This module is not available on targets that do *not* support CAS operations and are not
4+
//! emulated by the [`atomic_polyfill`] crate (e.g., MSP430).
45
//!
56
//! # Example
67
//!
@@ -73,8 +74,10 @@
7374
//!
7475
//! # Portability
7576
//!
76-
//! This module is not exposed to architectures that lack the instructions to implement CAS loops.
77-
//! Those architectures include ARMv6-M (`thumbv6m-none-eabi`) and MSP430 (`msp430-none-elf`).
77+
//! This module requires CAS atomic instructions which are not available on all architectures
78+
//! (e.g. ARMv6-M (`thumbv6m-none-eabi`) and MSP430 (`msp430-none-elf`)). These atomics can be emulated
79+
//! however with [`atomic_polyfill`], which is enabled with the `cas` feature and is enabled by default
80+
//! for `thumbv6m-none-eabi` and `riscv32` targets. MSP430 is currently not supported by [`atomic_polyfill`].
7881
//!
7982
//! # References
8083
//!

src/pool/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! A heap-less, interrupt-safe, lock-free memory pool (\*)
22
//!
3-
//! NOTE: This module is not available on targets that do *not* support CAS operations, e.g. ARMv6-M
3+
//! NOTE: This module is not available on targets that do *not* support CAS operations and are not
4+
//! emulated by the [`atomic_polyfill`] crate (e.g., MSP430).
45
//!
56
//! (\*) Currently, the implementation is only lock-free *and* `Sync` on ARMv6, ARMv7-{A,R,M} & ARMv8-M
67
//! devices
@@ -59,8 +60,10 @@
5960
//! on the target architecture (see section on ['Soundness'](#soundness) for more information). For
6061
//! this reason, `Pool` only implements `Sync` when compiling for some ARM cores.
6162
//!
62-
//! Also note that ARMv6-M architecture lacks the primitives for CAS loops so this module does *not*
63-
//! exist for `thumbv6m-none-eabi`.
63+
//! This module requires CAS atomic instructions which are not available on all architectures
64+
//! (e.g. ARMv6-M (`thumbv6m-none-eabi`) and MSP430 (`msp430-none-elf`)). These atomics can be emulated
65+
//! however with [`atomic_polyfill`], which is enabled with the `cas` feature and is enabled by default
66+
//! for `thumbv6m-none-eabi` and `riscv32` targets. MSP430 is currently not supported by [`atomic_polyfill`].
6467
//!
6568
//! # Soundness
6669
//!

0 commit comments

Comments
 (0)