1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! Kovan: High-performance **wait-free** memory reclamation for lock-free data structures.
//! Bounded memory usage, predictable latency.
//!
//! Kovan implements a wait-free safe memory reclamation (SMR) algorithm based on
//! the Crystalline / ASMR design. Unlike epoch-based reclamation (EBR) or
//! hazard pointers, kovan guarantees **bounded worst-case latency** for every
//! operation — no thread can be starved, even under contention.
//!
//! # Key Properties
//!
//! - **Wait-Free Progress**: Every operation completes in a bounded number of
//! steps, regardless of what other threads are doing. Stalled threads are
//! helped to completion by concurrent threads.
//! - **Zero Read Overhead**: Object loads require only a single atomic read —
//! the same cost as a raw `AtomicPtr::load`.
//! - **Bounded Memory**: Retired nodes are reclaimed in bounded batches.
//! The reclamation system cannot accumulate unbounded garbage, even with
//! stalled threads.
//! - **`no_std` Compatible**: Uses only `alloc`. No standard library required.
//!
//! # Architecture
//!
//! - **Per-thread epoch slots**: Each thread maintains a slot recording its
//! current epoch. Slots are protected by 128-bit DCAS (double compare-and-swap).
//! - **Batch retirement**: Retired nodes are accumulated in thread-local batches
//! of 64 and distributed across active slots via `try_retire`.
//! - **Wait-free helping**: Threads in the slow path publish their state so
//! other threads can help them complete, ensuring system-wide progress.
//!
//! # Example
//!
//! ```rust
//! use kovan::Atom;
//!
//! // High-level API: safe, zero-overhead reads
//! let config = Atom::new(vec![1, 2, 3]);
//! let guard = config.load();
//! assert_eq!(guard.len(), 3);
//! ```
extern crate alloc;
pub use ;
pub use ;
pub use ;
pub use Reclaimable;
pub use RetiredNode;
pub use ;
// Re-export retire from guard (it's the public API)
pub use retire;
// Re-export for convenience
pub use Ordering;