From f01ffb27dc027f45201ed1da657bb2decc154ece Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Sat, 11 Oct 2008 09:32:57 +0000 Subject: [PATCH] - ARM build fix -- add a non-atomic (but otherwise correct) _InterlockedCompareExchange64 intrinsic required since the RTL changes in 36166 svn path=/trunk/; revision=36711 --- reactos/include/psdk/intrin_arm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reactos/include/psdk/intrin_arm.h b/reactos/include/psdk/intrin_arm.h index 11bbe775f94..202b688f000 100644 --- a/reactos/include/psdk/intrin_arm.h +++ b/reactos/include/psdk/intrin_arm.h @@ -54,6 +54,17 @@ static __inline__ __attribute__((always_inline)) long _InterlockedCompareExchang return a; } +static __inline__ __attribute__((always_inline)) long long _InterlockedCompareExchange64(volatile long long * const dest, const long long exch, const long long comp) +{ + // + // FIXME + // + long long result; + result = *dest; + if (*dest == comp) *dest = exch; + return result; +} + static __inline__ __attribute__((always_inline)) void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand) { return (void*)_InterlockedCompareExchange((volatile long* const)Destination, (const long)Exchange, (const long)Comperand);