Sha256: 333bf8f9fbe39685f93ddad0bc0dc223af3eb5fd4c5e9356d4dc64bd79bbcb7d
Contents?: true
Size: 1.95 KB
Versions: 6
Compression:
Stored size: 1.95 KB
Contents
*** src/atomic_counter.hpp Sat Feb 18 18:05:37 2017 --- src/atomic_counter.hpp Thu Dec 14 20:54:51 2017 *************** *** 46,51 **** --- 46,53 ---- #define ZMQ_ATOMIC_COUNTER_WINDOWS #elif (defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_NETBSD || defined ZMQ_HAVE_GNU) #define ZMQ_ATOMIC_COUNTER_ATOMIC_H + #elif defined ZMQ_HAVE_AIX + #define ZMQ_ATOMIC_COUNTER_AIX #elif defined __tile__ #define ZMQ_ATOMIC_COUNTER_TILE #else *************** *** 60,65 **** --- 62,69 ---- #include "windows.hpp" #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H #include <atomic.h> + #elif defined ZMQ_ATOMIC_COUNTER_AIX + #include <sys/atomic_op.h> #elif defined ZMQ_ATOMIC_COUNTER_TILE #include <arch/atomic.h> #endif *************** *** 105,110 **** --- 109,116 ---- #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H integer_t new_value = atomic_add_32_nv (&value, increment_); old_value = new_value - increment_; + #elif defined ZMQ_ATOMIC_COUNTER_AIX + old_value = fetch_and_add ((atomic_p) &value, increment_); #elif defined ZMQ_ATOMIC_COUNTER_TILE old_value = arch_atomic_add (&value, increment_); #elif defined ZMQ_ATOMIC_COUNTER_X86 *************** *** 154,159 **** --- 160,169 ---- int32_t delta = - ((int32_t) decrement); integer_t nv = atomic_add_32_nv (&value, delta); return nv != 0; + #elif defined ZMQ_ATOMIC_COUNTER_AIX + int32_t delta = - ((int32_t) decrement); + integer_t old = fetch_and_add((atomic_p) &value, delta); + return old - decrement != 0; #elif defined ZMQ_ATOMIC_COUNTER_TILE int32_t delta = - ((int32_t) decrement); integer_t nv = arch_atomic_add (&value, delta); *************** *** 224,229 **** --- 234,240 ---- #undef ZMQ_ATOMIC_COUNTER_ARM #undef ZMQ_ATOMIC_COUNTER_WINDOWS #undef ZMQ_ATOMIC_COUNTER_ATOMIC_H + #undef ZMQ_ATOMIC_COUNTER_AIX #undef ZMQ_ATOMIC_COUNTER_TILE #endif
Version data entries
6 entries across 6 versions & 1 rubygems