Skip to main content

Practice · 1 of 1

Choose the Ordering

CHALLENGE
Difficulty: advanced+25 XP

Implement three functions over one std::atomic<unsigned>: bumpRelaxed (statistics: relaxed is enough), publishAndSpin (release store, acquire load on a bool+int pair), and seqTotal (fetch_add with seq_cst, return the previous value).

Back to lesson: Practice: Ordering Selection