[Vm-dev] 64bit vs 32bit atomic operations

tim Rowledge tim at rowledge.org
Sun Jul 24 18:31:14 UTC 2016

> On 24-07-2016, at 12:33 AM, Ben Coman <btc at openinworld.com> wrote:
> There was a comment recently "something" about a 64-bit operation not
> being atomic on a 32-bit system.  I wanted to review it again to try
> to understand it better, but I'm too vague on the context to find it.
> Anyone have a clue which post I'm thinking of…

Cog uses a couple of places where an atomic 64 bit read is really quite important. See /platforms/Cross/vm/sqAtomicOps.h Luckily when using gcc there are some compiler intrinsic functions that help out with things like compare and swap etc.

Hmm, I see I’m still relying on the ARM MMU being friendly for the plain set/get. Maybe I should look into that again sometime.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Porting is such sweet sorrow

More information about the Vm-dev mailing list