richardtech (richardtech) wrote,
richardtech
richardtech

More on atomic operations

Aha! I've found libatomic-ops, (http://packages.debian.org/unstable/libdevel/libatomic-ops-dev) which will do nicely. It's not perfect (in particular, it doesn't provide "increment" and "decrement" operations, so you have to pass a parameter of 1 or -1 to the "add" functions, which I expect will be slightly less efficient on some platforms. However, that's not a big thing, and it supports lots of platforms nicely.

So, instead, I can focus on writing / finding a cross platform reference counting library, which is what I actually wanted in the first place. :)
  • Post a new comment

    Error

    default userpic
  • 0 comments