[x265] [PATCH] winxp: fix build error on WinXP and VS2008
Steve Borho
steve at borho.org
Fri Jan 30 18:44:52 CET 2015
On 01/30, Min Chen wrote:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1422597154 -28800
> # Node ID 9f959e74723a69f1327c6a622c2ab265babc1f36
> # Parent 5e5dc3763f6386da9722903033a2b9dd263a5226
> winxp: fix build error on WinXP and VS2008
> ---
> source/common/threading.h | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff -r 5e5dc3763f63 -r 9f959e74723a source/common/threading.h
> --- a/source/common/threading.h Thu Jan 29 10:37:54 2015 -0600
> +++ b/source/common/threading.h Fri Jan 30 13:52:34 2015 +0800
> @@ -60,6 +60,20 @@
>
> #include <intrin.h>
>
> +#if _WIN32_WINNT <= _WIN32_WINNT_WINXP
> +__forceinline
> +LONG
> +InterlockedAdd(
> + __inout LONG volatile *Addend,
> + __in LONG Value
> + )
> +
> +{
> + return InterlockedExchangeAdd(Addend, Value) + Value;
> +}
> +#endif
> +
> +
this belongs in winxp.h
> #define CLZ(id, x) _BitScanReverse(&id, x)
> #define CTZ(id, x) _BitScanForward(&id, x)
> #define ATOMIC_INC(ptr) InterlockedIncrement((volatile LONG*)ptr)
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
--
Steve Borho
More information about the x265-devel
mailing list