On Thu, 2022-11-17 at 11:46 +0800, Jinyang He wrote: > > So we do need an additional dbar for compare-and-exchange, but do > > not > > need it for a bare atomic exchange? > Yes. Ok, I just noticed we also don't use dbar in atomic_add etc. I've adjusted the patch a little (in attachment): rewritten the ChangeLog and test, and renamed "value_exchange_and" to just "value_exchange" because we are not doing anything beyond the exchange. If it looks OK you can just send it as v2. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University