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
//! Where a latched tree's threads may interleave: before each access to an
//! atomic that threads share, and in each round of waiting for another
//! thread ([`Interleaving`]).
//!
//! Compiled for real use, both are nothing and a spin hint. Under Shuttle
//! (`--cfg shuttle`, tests only, `map/shuttle_tests.rs`), each is a
//! point where Shuttle's scheduler may switch to another thread, which it
//! runs one at a time. Shuttle's own atomics would do the same, but the
//! latch words live in node pages and the racing reads load page fields in
//! place (`AtomicU16::from_ptr`), so the tree keeps core's atomics and says
//! where they are. One thread runs at a time, so every access is
//! sequentially consistent: Shuttle finds bad interleavings, not
//! reorderings a weak memory model allows.
//!
//! Outside a Shuttle test, a `--cfg shuttle` build behaves as any other, so
//! the whole suite runs under it.
/// The points where Shuttle may switch threads; see the module
/// documentation.
pub ;