On Wed, 2006-05-24 at 17:13 +0200, Maarten de Boer wrote:
Hello,
I am looking for a cross-platform implementation of an atomic
integer.
Under Linux, a build an c++ class "atomic" around asm/atomic.h,
(which I can use as if it where an int), but I'd like to have a
solution that also works on Windows XP and Mac OS X.
Thanks for any suggestions,
Maarten
Reviving an ancient thread, but has anyone looked at this?
http://www.hpl.hp.com/research/linux/atomic_ops/
It's pretty robust by the looks of it, nicely autotoolized, portable (to
various compilers and architechtures).
You can even apt-get install lib-atomicops-dev (in sid at least)
Looks like exactly what I've been looking for...
-DR-