Hacker News new | ask | show | jobs
by mdasen 862 days ago
It seems unlikely that Power completely lacked atomics. This is a very vague recollection since it's been a long time, but I feel like there were some differences. I think PowerPC used a load-linked/store-conditional with a stronger guarantee than a CAS (compare and swap) on x86. For example, if x = 1 and you CAS it to a new value, another thread might have changed it to 8 and then back to 1 in the meantime and it'll still succeed (the ABA problem: https://en.wikipedia.org/wiki/ABA_problem).

I think x86 also has a stronger memory model providing less flexibility, but greater consistency.