rfc: 0015 scalar atomics and the Aji memory model accepted (revision 2) and integrated into the spec
The Aji RC11 profile (RC11 with NO-THIN-AIR; stronger than ISO C11/C++20) as normative axioms in spec 04 §20; DRF-SC; linear atomic<T> for AtomicScalar with atomic.new/atomic.take; ref<atomic<T>> operands; ordering tables incl. cmpxchg failure table and two results; effects [atomic] / [atomic, atomic.weak]; target atomic_widths and E4203; E4202; enumerator as oracle (observed ⊆ allowed, exact equality on the normative litmus corpus). Feature atomics stays reserved until P5-2a. Q-015 resolved; record/replay and Q-017 moved to Phase 8. RFC 0003 superseded. AIR bundle +1.9 %.
This commit is contained in:
1 parent
702d69b2c1
commit
2bbbd2135c
24 files changed
+927
-142
No files matched your search
@@ -8,7 +8,7 @@ A `Copy` value may be duplicated without changing ownership semantics.
|
||||
|
||||
Typical examples: integers, booleans, small aggregates containing only `Copy` fields.
|
||||
|
||||
Not `Copy`: `Own<T>`, `Region`, `Island<T>`, `File`, `Socket`, task/thread handles.
|
||||
Not `Copy`: `Own<T>`, `Region`, `Island<T>`, `atomic<T>`, `File`, `Socket`, task/thread handles.
|
||||
|
||||
## Send
|
||||
|
||||
@@ -22,7 +22,7 @@ A `Share` value may be observed concurrently through immutable access.
|
||||
|
||||
Deeply immutable values are normally `Share`.
|
||||
|
||||
Interior-mutability wrappers must establish their own synchronization semantics to qualify.
|
||||
Interior-mutability wrappers must establish their own synchronization semantics to qualify. `mutex<T>` does so by locking. `atomic<T>` does so because every access through a shared borrow is an atomic operation with an explicit ordering (spec 04 §23).
|
||||
|
||||
## Freeze
|
||||
|
||||
@@ -41,7 +41,7 @@ Examples may include thread-local handles, event-loop-local registrations or pla
|
||||
An `IslandSafe` value may be stored in an island graph (spec 03 §22). Derived structurally:
|
||||
|
||||
- **IslandSafe:** integers, `bool`, built-in enums, `iref<U>`, and arrays, structs and enums of `IslandSafe` values.
|
||||
- **Not IslandSafe:** borrows, owners, regions, graph owners (`island`, `frozen`, `arc`), resources, endpoints, `task`, `scope`, `shield`, `guard`, `mutex`, `cap<K>`.
|
||||
- **Not IslandSafe:** borrows, owners, regions, graph owners (`island`, `frozen`, `arc`), resources, endpoints, `task`, `scope`, `shield`, `guard`, `mutex`, `atomic<T>`, `cap<K>`.
|
||||
|
||||
Because of it, a graph never holds outside authority or a mutable ownership edge, so freeze, conversion and transfer are O(1).
|
||||
|
||||
|
||||
Reference in new issue
Block a user