barrier is about a separate concept: a thread-synchronization building block where threads that call
barrier(foo)
sleep until all threads have calledbarrier(foo)
, then they all wake up. This is unrelated to memory ordering and fences.relaxed-atomics should maybe be a synonym of [tag:memory_order] or deleted. The default is
std::memory_order_seq_cst
, so any weaker order requires an explicit memory_order parameter. And almost any question about what std::memory_order to use is at least considering the possibility of using weaker orders.OTOH, the memory-order tag also includes things like language memory model rules, and some like Java don't allow memory orders weaker than sequential consistency. So use of that tag doesn't imply that it's about weaker orders. But I still think we don't need a tag about "relaxed" atomics. It only has 27 questions, 1 rust the rest c++. It can mean
std::memory_order_relaxed
(no ordering wrt. operations on other objects) or depending on who's using it, can mean any order weaker thanseq_cst
.memory-model - For questions on memory ordering models at the programming language level (above the ISA or machine language level). This is about what the rules are for memory ordering, atomicity, thread-safety, and so on. Fairly related, but perhaps worthy of being a separate tag. language-lawyer questions about memory-ordering rules often use this tag, but there are plenty of questions without language-lawyer.
Several uses of this tag are about hardware / ISA memory models; perhaps we should relax the description to allow those usages, or tag such questions memory-order?