| 155 | #endif |
| 156 | |
| 157 | static FORCEINLINE int32_t |
| 158 | atomic_incr32(atomic32_t* val) { |
| 159 | #ifdef _MSC_VER |
| 160 | int32_t old = (int32_t)_InterlockedExchangeAdd((volatile long*)&val->nonatomic, 1); |
| 161 | return (old + 1); |
| 162 | #else |
| 163 | return __sync_add_and_fetch(&val->nonatomic, 1); |
| 164 | #endif |
| 165 | } |
| 166 | |
| 167 | static FORCEINLINE int32_t |
| 168 | atomic_add32(atomic32_t* val, int32_t add) { |
no outgoing calls
no test coverage detected