Code AnalysisHard 60s
seqlock torn read output
seq is atomic<unsigned>. Writer: seq++; write payload; seq++.
Reader: do{ a=seq.load(acquire); if(a&1) continue; read payload; b=seq.load(acquire);}while(a!=b);
Why is the payload read still technically a data race?
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.