- ARM build fix -- add a non-atomic (but otherwise correct) _InterlockedCompareExchan...
authorStefan Ginsberg <stefanginsberg@gmail.com>
Sat, 11 Oct 2008 09:32:57 +0000 (09:32 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Sat, 11 Oct 2008 09:32:57 +0000 (09:32 +0000)
svn path=/trunk/; revision=36711

reactos/include/psdk/intrin_arm.h

index 11bbe77..202b688 100644 (file)
@@ -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);