X-Git-Url: https://git.piment-noir.org/?p=deb_x265.git;a=blobdiff_plain;f=source%2Fcommon%2Fwinxp.h;h=0446265e560929ee68d847dd2b72336c86a35aa7;hp=b10580464d411570bb2213b0d1366f2adbeed95a;hb=b53f7c52d8280ab63876efd6eb292c21430ac607;hpb=5c9b45285dd64723ad1dac380b98a7b1f3095674 diff --git a/source/common/winxp.h b/source/common/winxp.h index b105804..0446265 100644 --- a/source/common/winxp.h +++ b/source/common/winxp.h @@ -56,30 +56,6 @@ void cond_destroy(ConditionVariable *cond); #define WakeAllConditionVariable x265::cond_broadcast #define XP_CONDITION_VAR_FREE x265::cond_destroy -#if defined(_MSC_VER) - -/* Windows XP did not define atomic OR 64, but gcc has a good version, so - * only use this workaround when targeting XP with MSVC */ -FORCEINLINE LONGLONG interlocked_OR64(__inout LONGLONG volatile *Destination, - __in LONGLONG Value) -{ - LONGLONG Old; - - do - { - Old = *Destination; - } - while (_InterlockedCompareExchange64(Destination, Old | Value, Old) != Old); - - return Old; -} - -#define ATOMIC_OR(ptr, mask) x265::interlocked_OR64((volatile LONG64*)ptr, mask) - -#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) -#pragma intrinsic(_InterlockedCompareExchange64) -#endif -#endif // defined(_MSC_VER) } // namespace x265 #else // if defined(_WIN32) && (_WIN32_WINNT < 0x0600)