Lines Matching refs:destination
47 ZYAN_INLINE ZyanUPointer ZyanAtomicCompareExchange(ZyanAtomicPointer* destination, in ZyanAtomicCompareExchange() argument
51 &destination->value, (void*)comparand, (void*)value, &destination->value)); in ZyanAtomicCompareExchange()
54 ZYAN_INLINE ZyanUPointer ZyanAtomicIncrement(ZyanAtomicPointer* destination) in ZyanAtomicIncrement() argument
56 return (ZyanUPointer)(__sync_fetch_and_add(&destination->value, (void*)1, in ZyanAtomicIncrement()
57 &destination->value)) + 1; in ZyanAtomicIncrement()
60 ZYAN_INLINE ZyanUPointer ZyanAtomicDecrement(ZyanAtomicPointer* destination) in ZyanAtomicDecrement() argument
62 return (ZyanUPointer)(__sync_sub_and_fetch(&destination->value, (void*)1, &destination->value)); in ZyanAtomicDecrement()
69 ZYAN_INLINE ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination, in ZyanAtomicCompareExchange32() argument
72 return (ZyanU32)(__sync_val_compare_and_swap(&destination->value, comparand, value, in ZyanAtomicCompareExchange32()
73 &destination->value)); in ZyanAtomicCompareExchange32()
76 ZYAN_INLINE ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination) in ZyanAtomicIncrement32() argument
78 return (ZyanU32)(__sync_fetch_and_add(&destination->value, 1, &destination->value)) + 1; in ZyanAtomicIncrement32()
81 ZYAN_INLINE ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination) in ZyanAtomicDecrement32() argument
83 return (ZyanU32)(__sync_sub_and_fetch(&destination->value, 1, &destination->value)); in ZyanAtomicDecrement32()
90 ZYAN_INLINE ZyanU64 ZyanAtomicCompareExchange64(ZyanAtomic64* destination, in ZyanAtomicCompareExchange64() argument
93 return (ZyanU64)(__sync_val_compare_and_swap(&destination->value, comparand, value, in ZyanAtomicCompareExchange64()
94 &destination->value)); in ZyanAtomicCompareExchange64()
97 ZYAN_INLINE ZyanU64 ZyanAtomicIncrement64(ZyanAtomic64* destination) in ZyanAtomicIncrement64() argument
99 return (ZyanU64)(__sync_fetch_and_add(&destination->value, 1, &destination->value)) + 1; in ZyanAtomicIncrement64()
102 ZYAN_INLINE ZyanU64 ZyanAtomicDecrement64(ZyanAtomic64* destination) in ZyanAtomicDecrement64() argument
104 return (ZyanU64)(__sync_sub_and_fetch(&destination->value, 1, &destination->value)); in ZyanAtomicDecrement64()