Lines Matching defs:compare
87 * \brief Atomic compare and exchange (CAS) 32-bit value.
89 * \param compare Old value.
91 * \return compare value if CAS passes, *dstAddr value otherwise
94 * to compare value and if that comparison passes, value is replaced with
97 * If CAS succeeds, compare value is returned. Otherwise value stored in
100 DE_INLINE deUint32 deAtomicCompareExchangeUint32 (volatile deUint32* dstAddr, deUint32 compare, deUint32 exchange)
103 return _InterlockedCompareExchange((volatile long*)dstAddr, exchange, compare);
105 return __sync_val_compare_and_swap(dstAddr, compare, exchange);
171 * \brief Atomic compare and exchange (CAS) 64-bit value.
173 * \param compare Old value.
175 * \return compare value if CAS passes, *dstAddr value otherwise
178 * to compare value and if that comparison passes, value is replaced with
181 * If CAS succeeds, compare value is returned. Otherwise value stored in
184 DE_INLINE deUint64 deAtomicCompareExchangeUint64 (volatile deUint64* dstAddr, deUint64 compare, deUint64 exchange)
187 return _InterlockedCompareExchange64((volatile long long*)dstAddr, exchange, compare);
189 return __sync_val_compare_and_swap(dstAddr, compare, exchange);
230 * \brief Atomic compare and exchange (CAS) pointer.
232 * \param compare Old value.
234 * \return compare value if CAS passes, *dstAddr value otherwise
237 * to compare value and if that comparison passes, value is replaced with
240 * If CAS succeeds, compare value is returned. Otherwise value stored in
243 DE_INLINE void* deAtomicCompareExchangePtr (void* volatile* dstAddr, void* compare, void* exchange)
246 return (void*)deAtomicCompareExchangeUint64((volatile deUint64*)dstAddr, (deUint64)compare, (deUint64)exchange);
248 return (void*)deAtomicCompareExchangeUint32((volatile deUint32*)dstAddr, (deUint32)compare, (deUint32)exchange);