</>EmbeddedInterview

What is a compiler barrier versus a CPU memory barrier?

MediumOperating System Concepts

A compiler barrier restricts compiler reordering; a CPU barrier enforces specified hardware memory ordering. Neither alone necessarily provides both guarantees.