Lines Matching refs:mem
99 #define ATOMIC_LOAD(n, type) type __atomic_load_ ## n (const volatile void* mem, int memorder) \
102 type ret = *(const volatile type*)mem; \
107 #define ATOMIC_STORE(n, type) void __atomic_store_ ## n (volatile void * mem, type val, int memorde…
110 *(volatile type *)mem = val; \
114 #define ATOMIC_EXCHANGE(n, type) type __atomic_exchange_ ## n (volatile void* mem, type val, int me…
117 type ret = *(volatile type*)mem; \
118 *(volatile type*)mem = val; \
123 #define CMP_EXCHANGE(n, type) bool __atomic_compare_exchange_ ## n (volatile void* mem, void* expec…
127 if (*(volatile type*)mem == *(type*)expect) { \
129 *(volatile type*)mem = desired; \
131 *(type*)expect = *(volatile type*)mem; \