On 2025-06-12 14:47, Jeremy Drake via Cygwin-patches wrote:
On Thu, 12 Jun 2025, Brian Inglis wrote:
Rust apparently uses yield on arm32, and isb (instruction sync barrier) on
aarch64, as yield is effectively a NOP (although it could be implemented to
free up pipeline slots, SMT switch, or signal), while isb (with optional sy
operand) is more like pause on x86_64:
I looked up what mingw-w64 does, and for both arm32 and aarch64 they use
"dmb ishst" followed by "yield" for YieldProcessor(). I think this makes
sense, since you'd want any pending stores to be available before
re-checking the spin condition.
That may be better depending on load and store acquire/release options described
in relation to barriers:
https://github.com/eclipse-openj9/openj9/issues/6332
https://devblogs.microsoft.com/oldnewthing/20220812-00/?p=106968
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut
-- Antoine de Saint-Exupéry