Lines Matching refs:ptr
27 static inline void SoftBusAtomicAdd32(volatile uint32_t* ptr, int32_t value)
30 _InterlockedExchangeAdd(ptr, value);
34 __sync_fetch_and_add(ptr, value);
38 static inline uint32_t SoftBusAtomicAddAndFetch32(volatile uint32_t* ptr, int32_t value)
41 return _InterlockedExchangeAdd(ptr, value) + value;
45 return __sync_add_and_fetch(ptr, value);
51 static inline void SoftBusAtomicAdd64(uint64_t* ptr, int64_t value)
54 _InterlockedExchangeAdd64((volatile long long*)ptr, value);
58 __sync_fetch_and_add(ptr, value);
62 static inline bool SoftBusAtomicCmpAndSwap32(volatile uint32_t* ptr, int32_t oldValue, int32_t newValue)
65 uint32_t initial = _InterlockedCompareExchange(ptr, newValue, oldValue);
70 return __sync_bool_compare_and_swap(ptr, oldValue, newValue);