You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the load operation reads the value 0, how are they ordered in the single total order? According to [atomics.order] p3
An atomic operation A on some atomic object M is coherence-ordered before another atomic operation B on M if
[...]
A and B are not the same atomic read-modify-write operation, and there exists an atomic modification X of M such that A reads the value stored by X and X precedes B in the modification order of M, or
The initialization to v is not an atomic modification as per [atomics.types.operations] p3
Effects: Initializes the object with the value desired. Initialization is not an atomic operation ([intro.multithread]).
The initialization(i.e. X) precedes the store(i.e. B) in the modification order of v, however, X is not atomic modification, so, how does p3.3 apply to this case to determine the order of the load and store in the single total order?