3 ms·
There is definitely something special going on with relaxed updates though. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2480.html#unordered htt
by burntsushi 11y ago
There is definitely something special going on with relaxed updates though. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2480.html#unordered http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n248...
Also https://news.ycombinator.com/item?id=9796245 https://news.ycombinator.com/item?id=9796245
I think your initial suspicion is right. The next section: "There are several possible definitions of a data race. Probably the most intuitive definition is that it occurs when two ordinary accesses to a scalar, at least one of which is a write, are performed simultaneously by different threads. Our definition is actually quite close to this, but varies in two ways:" ... "Instead of restricting simultaneous execution, we ask that conflicting accesses by different threads be ordered by happens-before. This is equivalent in simpler cases, but the definition based on simultaneous execution would be inappropriate for weakly ordered atomics." continues at: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2480.html#races http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n248...