Author: tkreuzer
Date: Thu Jul 24 14:22:16 2008
New Revision: 34749
URL:
http://svn.reactos.org/svn/reactos?rev=34749&view=rev
Log:
add _InterlockedExchange64 to intin_x86.h
Modified:
branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h
Modified: branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] Thu Jul 24
14:22:16 2008
@@ -121,6 +121,15 @@
return __sync_lock_test_and_set(Target, Value);
}
+#if defined(_M_AMD64)
+static __inline__ __attribute__((always_inline)) long long
_InterlockedExchange64(volatile long long * const Target, const long long Value)
+{
+ /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full
barrier */
+ __sync_synchronize();
+ return __sync_lock_test_and_set(Target, Value);
+}
+#endif
+
static __inline__ __attribute__((always_inline)) void * _InterlockedExchangePointer(void
* volatile * const Target, void * const Value)
{
/* NOTE: ditto */