Re:Google Is Uncovering Hundreds of Race Conditions Within t...
by jcranmer on Thursday October 03, 2019 @03:15PM
(#21150903)
A minimal program (using C11 threads):
There is an undefined data race on x, since it is simultaneously accessed from two threads without any synchronization. Replace the declaration of x with `_Atomic int x;`, and the resulting code is well-defined.
[ Parent
| on HN ]
There are no comments on this comment yet.