Lines Matching defs:value
23 static void hdr_atomic_store_pointer(void** pointer, void* value)
26 *pointer = value;
35 static void __inline hdr_atomic_store_64(int64_t* field, int64_t value)
38 *field = value;
41 static int64_t __inline hdr_atomic_exchange_64(volatile int64_t* field, int64_t value)
44 return _InterlockedExchange64(field, value);
51 initial_value = _InterlockedCompareExchange64(field, value, comparand);
59 static int64_t __inline hdr_atomic_add_fetch_64(volatile int64_t* field, int64_t value)
62 return _InterlockedExchangeAdd64(field, value) + value;
69 initial_value = _InterlockedCompareExchange64(field, comparand + value, comparand);
73 return initial_value + value;
89 #define hdr_atomic_add_fetch_64(field, value) __atomic_add_fetch(field, value, __ATOMIC_SEQ_CST)
104 static inline void hdr_atomic_store_pointer(void** pointer, void* value)
106 asm volatile ("lock; xchgq %0, %1" : "+q" (value), "+m" (*pointer));
116 static inline void hdr_atomic_store_64(int64_t* field, int64_t value)
118 asm volatile ("lock; xchgq %0, %1" : "+q" (value), "+m" (*field));
121 static inline int64_t hdr_atomic_exchange_64(volatile int64_t* field, int64_t value)
124 asm volatile ("lock; xchgq %1, %2" : "=r" (result), "+q" (value), "+m" (*field));
128 static inline int64_t hdr_atomic_add_fetch_64(volatile int64_t* field, int64_t value)
130 return __sync_add_and_fetch(field, value);