| 1580 | } |
| 1581 | |
| 1582 | static FORCEINLINE int |
| 1583 | atomic_cas_ptr(atomicptr_t* dst, void* val, void* ref) { |
| 1584 | #ifdef _MSC_VER |
| 1585 | # if ARCH_64BIT |
| 1586 | return (_InterlockedCompareExchange64((volatile long long*)&dst->nonatomic, |
| 1587 | (long long)val, (long long)ref) == (long long)ref) ? 1 : 0; |
| 1588 | # else |
| 1589 | return (_InterlockedCompareExchange((volatile long*)&dst->nonatomic, |
| 1590 | (long)val, (long)ref) == (long)ref) ? 1 : 0; |
| 1591 | # endif |
| 1592 | #else |
| 1593 | return __sync_bool_compare_and_swap(&dst->nonatomic, ref, val); |
| 1594 | #endif |
| 1595 | } |
| 1596 | |
| 1597 | //! Yield the thread remaining timeslice |
| 1598 | static void |
no outgoing calls
no test coverage detected