diff --git a/www/atomic_design.html b/www/atomic_design.html index 36e73244..87a2f624 100644 --- a/www/atomic_design.html +++ b/www/atomic_design.html @@ -53,6 +53,40 @@ should be identical (and conforming) for all three designs. +
+With any design, the (back end) compiler writer should note: +
+ +++ ++The decision to implement lock-free operations on any given type (or not) is an +ABI-binding decision. One can not change from treating a type as not lock free, +to lock free (or vice-versa) without breaking your ABI. +
+ ++Example: +
+ +++TU1.cc +----------- +extern atomic<long long> A; +int foo() { return A.compare_exchange_strong(w, x); } + +TU2.cc +----------- +extern atomic<long long> A; +void bar() { return A.compare_exchange_strong(y, z); } +
+If only one of these calls to compare_exchange_strong is +implemented with mutex-locked code, then that mutex-locked code will not be +executed mutually exclusively of the one implemented in a lock-free manner. +
+