views:

473

answers:

2

I just found this:

http://www.emadar.com/fpc/lockfree.htm

at first glance it looks fine. Is anybody using it? Or maybe somebody already looked at it and found it unusable?

+1  A: 

If it is ok, it is only ok for x86 and x86_64 processors, and most likely not for PowerPC (and maybe ARM), since there are no memory barrier instructions.

I've it in production for a simple case, and noticed no problems. I use the non-generic one in Delphi though.

Marco van de Voort
+1  A: 

At a quick glance, it doesn't solve the ABA problem.

Similar implementation that solves the ABA problem can be found here.

gabr
Perhaps it was implemented on LL/SC CPUs.
Blank Xavier