smeso

concurrency

Memory ordering and atomic operations synchronization

in Technical, c, cpp, rust, atomic, concurrency, memory, memory-ordering, memory-model, memory-barrier, low-latency, optimization

Every time I need to play with atomic variables and I try to be clever and optimize them as much as possible I need to re-learn what the various memory ordering options do. It doesn't help that memory ordering is easily one of the most complex topics I ever worked with. For this reason I decided to finally write down what I (think) I know about memory ordering, making it easier for the future me …

Read the rest of the post