On 7 February 2012 23:34, john skaller <[email protected]>wrote:
> I am looking at the atomic ops stuff, and I find this a bit suspicious, > and also suboptimal: > > It's as optimal as GCC's intrinsics, better than Oracle Studio's intrinsics and compatible with older GCC compilers. > Wouldn't it be better to use this function: > > type __sync_fetch_and_add (type *ptr, type value, ...) > > which is guaranteed to work on all processors? > > There's already a version check in there somewhere, with fallback to a mutex. GCC 4.0.1 it made an appearance, so GCC 3 and 2 are not supported, i.e. older versions of RHEL. Compare with my atomics: http://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/include/pgm/atomic.h Of note, Apple added their own intrinsics in addition to GCC, odd. -- Steve-o
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
