kernel32: Add support for InterlockedCompareExchange64

Alexandre Julliard julliard at winehq.org
Thu Feb 4 08:05:26 CST 2010


Maarten Lankhorst <m.b.lankhorst at gmail.com> writes:

> +extern inline LONG WINAPI InterlockedCompareExchange64( LONG64 volatile *dest, LONG64 xchg, LONG64 compare );
> +extern inline LONG WINAPI InterlockedCompareExchange64( LONG64 volatile *dest, LONG64 xchg, LONG64 compare )
> +{
> +    LONG64 ret;
> +    __asm__ __volatile__( "lock; cmpxchg8b (%1)"
> +                          : "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
> +    return ret;
> +}

This can't possibly work.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list