Skip to main content

Practice ยท 1 of 1

Choose the Ordering

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).

Difficulty: advanced

Back to lesson: Practice: Ordering Selection