|
|
|
|
|
by ibraheemdev
296 days ago
|
|
> There is no way the shared_ptr<T> is using the expensive sequentially consistent atomic operations. All RMW operations have sequentially consistent semantics on x86. It's not exactly a store buffer flush, but any subsequent loads in the pipeline will stall until the store has completed. |
|
Sequential consistency is a property of a programming language's semantics and can not simply be inferred from hardware. It is possible for hardware operations to all be SC but for the compiler to still provide weaker memory orderings through compiler specific optimizations.