I have some code that uses:
__sync_bool_compare_and_swap
it compiles fine on Linux.
But when I try to compile it on MacOSX in g++, I get:
error: ‘__sync_bool_compare_and_swap’ was not declared in this scope
How do I fix this? (This is Mac OSX 10.5.8, so it’s intel .. .and should have this instruction).
Thanks!
If you can’t find it, you can use OSCompareAndSwap() on Mac.
But it would be nice to have cross-platform code, wouldn’t it.