| 165 | } |
| 166 | |
| 167 | static FORCEINLINE int32_t |
| 168 | atomic_add32(atomic32_t* val, int32_t add) { |
| 169 | #ifdef _MSC_VER |
| 170 | int32_t old = (int32_t)_InterlockedExchangeAdd((volatile long*)&val->nonatomic, add); |
| 171 | return (old + add); |
| 172 | #else |
| 173 | return __sync_add_and_fetch(&val->nonatomic, add); |
| 174 | #endif |
| 175 | } |
| 176 | |
| 177 | static FORCEINLINE void* |
| 178 | atomic_load_ptr(atomicptr_t* src) { |
no outgoing calls
no test coverage detected