|
|
|
|
|
by hedora
1584 days ago
|
|
> In languages were data races are possible you can have every thread only ever increment x, and yet x's value will decrease due to a data race. That would be a very strange language, or a very strange machine. In particular integer reads and writes are atomic (though not necessarily well ordered) on x86, arm, etc, so you'd be hard pressed to get a C compiler to emit code that tears the reads or writes in a way that would lead to integer decrements. |
|