Explore thread synchronization in the Arm memory model
Introduction
Thread Synchronization, Arm Memory Model, and Tools
Herd7 and Litmus7 Test Primer
Thread Synchronization Examples
Additional Resources
Next Steps
Explore thread synchronization in the Arm memory model
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Use AArch64 for the MP litmus test. Configure your tools and hardware runs for the same architecture.
Herd7 evaluates outcomes against the formal memory model, while Litmus7 runs the test on hardware. A compliant Arm CPU can exhibit stronger ordering than the formal model, and a finite run can miss rare outcomes. Increasing the iteration count improves your chances of observing rare outcomes but doesn’t guarantee that every permitted outcome will occur.
Run the test in Herd7 and review the outcomes permitted by the formal model. After you can reproduce and interpret the outcomes, run the same test with Litmus7 on Arm hardware to compare behavior.
Use
LDAR for load-acquire and STLR for store-release. Compare the examples to see how these instructions enforce acquire-release ordering.Increase the iteration count with the
-s option. For example, run litmus7 ./test.litmus -s 5000000 to execute five million iterations instead of the default one million.