Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite atomics section #378

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0347b01
Write “Multithreaded Execution” and add simplified atomic spec
SabrinaJewson Aug 4, 2022
42f46d2
Fix one broken link
SabrinaJewson Aug 4, 2022
46f31ae
Replace accidental rs code blocks with rust
SabrinaJewson Aug 4, 2022
103a733
Replace reads with explicit `println!`s
SabrinaJewson Aug 4, 2022
a26eab4
Write the “Relaxed” section
SabrinaJewson Aug 5, 2022
d01fb66
Remove specification chapter
SabrinaJewson Aug 5, 2022
715e67f
Write about `Acquire` and `Release`
SabrinaJewson Aug 14, 2022
afe0ee2
Write the `SeqCst` section
SabrinaJewson Aug 28, 2022
c1129e3
“happens before” → “happens-before”
SabrinaJewson Aug 28, 2022
b896399
Introduce synchronizes-with terminology
SabrinaJewson Aug 28, 2022
59fde6f
Use “coherence” terminology from the start
SabrinaJewson Aug 28, 2022
6dc3d54
Remove old sections and introduce “AM” in intro
SabrinaJewson Aug 28, 2022
29707ee
“isomorphic” → “functionally equivalent”
SabrinaJewson Aug 28, 2022
52d5d13
Define the term “race condition”
SabrinaJewson Aug 28, 2022
40b06fe
Add note about duplication of `1` in M.O.
SabrinaJewson Aug 28, 2022
390754b
Explain the ABA problem
SabrinaJewson Aug 28, 2022
493c671
Dispel the myth that RMWs “see the latest value”
SabrinaJewson Aug 28, 2022
dc6a942
Explain the C++20 release sequence changes
SabrinaJewson Aug 28, 2022
b3c2e62
Explain the Abstract Machine
SabrinaJewson Aug 28, 2022
a9eb1f6
Improve the explanations of coherence
SabrinaJewson Aug 28, 2022
8068390
Show the final correct execution in mutex example
SabrinaJewson Aug 28, 2022
3c76e35
Add a more formal explanation of happens-before
SabrinaJewson Aug 28, 2022
d4f8f47
Write about acquire and release fences
SabrinaJewson Aug 29, 2022
5e27ed5
Improve the `SeqCst` explanation
SabrinaJewson Sep 4, 2022
805070e
Write about `SeqCst` fences
SabrinaJewson Sep 4, 2022
c19184a
Fix Unicode art incorrectly interpreted as Rust code
SabrinaJewson Sep 4, 2022
2384caa
Define “unsequenced” early on
SabrinaJewson Sep 4, 2022
d9dabf4
Note that a release fence followed by multiple stores is not necessar…
SabrinaJewson Sep 4, 2022
09c428e
Remove the signals section for now
SabrinaJewson Oct 1, 2022
ff32f70
Fix CI
SabrinaJewson Nov 4, 2022
af524a5
Fix typos
SabrinaJewson Jan 12, 2024
f3277bf
Mention that Rust atomics correspond to `atomic_ref`
SabrinaJewson Jan 12, 2024
6d16ea5
Explain the terms “strongly/weakly-ordered hardware”
SabrinaJewson Jan 12, 2024
19b059a
Merge branch 'master' into atomics
SabrinaJewson Jan 12, 2024
b139a3c
Simplify SeqCst demonstration, and remove incorrect claim
SabrinaJewson Mar 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ git-repository-url = "https://github.com/rust-lang/nomicon"
"./arc-layout.html" = "./arc-mutex/arc-layout.html"
"./arc.html" = "./arc-mutex/arc.html"

# Atomics chapter
"./atomics.html" = "./atomics/atomics.html"

[rust]
edition = "2021"
7 changes: 6 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
* [Concurrency](concurrency.md)
* [Races](races.md)
* [Send and Sync](send-and-sync.md)
* [Atomics](atomics.md)
* [Atomics](./atomics/atomics.md)
* [Multithreaded Execution](./atomics/multithread.md)
* [Relaxed](./atomics/relaxed.md)
* [Acquire and Release](./atomics/acquire-release.md)
* [SeqCst](./atomics/seqcst.md)
* [Fences](./atomics/fences.md)
* [Implementing Vec](./vec/vec.md)
* [Layout](./vec/vec-layout.md)
* [Allocating](./vec/vec-alloc.md)
Expand Down
2 changes: 1 addition & 1 deletion src/arc-mutex/arc-clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ happens-before relationship but is atomic. When `Drop`ping the Arc, however,
we'll need to atomically synchronize when decrementing the reference count. This
is described more in [the section on the `Drop` implementation for
`Arc`](arc-drop.md). For more information on atomic relationships and Relaxed
ordering, see [the section on atomics](../atomics.md).
ordering, see [the section on atomics](../atomics/atomics.md).

Thus, the code becomes this:

Expand Down
239 changes: 0 additions & 239 deletions src/atomics.md

This file was deleted.

Loading