Alexandre Julliard : libport: Implemented the interlocked_cmpxchg128 function for ARM64.
Alexandre Julliard
julliard at winehq.org
Wed Jan 16 13:47:43 CST 2013
Module: wine
Branch: master
Commit: cf66a1f0eed0d71ad45a365c5c51a8a35df2c591
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf66a1f0eed0d71ad45a365c5c51a8a35df2c591
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jan 16 12:34:51 2013 +0100
libport: Implemented the interlocked_cmpxchg128 function for ARM64.
---
libs/port/interlocked.c | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/libs/port/interlocked.c b/libs/port/interlocked.c
index 143d226..135bfc1 100644
--- a/libs/port/interlocked.c
+++ b/libs/port/interlocked.c
@@ -313,28 +313,6 @@ __int64 interlocked_cmpxchg64( __int64 *dest, __int64 xchg, __int64 compare )
return compare;
}
-#ifdef __aarch64__
-int interlocked_cmpxchg128( __int64 *dest, __int64 xchg_high, __int64 xchg_low, __int64 *compare )
-{
- int retv;
- pthread_mutex_lock( &interlocked_mutex );
- if (dest[0] == compare[0] && dest[1] == compare[1])
- {
- dest[0] = xchg_low;
- dest[1] = xchg_high;
- retv = 1;
- }
- else
- {
- compare[0] = dest[0];
- compare[1] = dest[1];
- retv = 0;
- }
- pthread_mutex_unlock( &interlocked_mutex );
- return retv;
-}
-#endif
-
int interlocked_xchg( int *dest, int val )
{
int retv;
@@ -365,4 +343,26 @@ int interlocked_xchg_add( int *dest, int incr )
return retv;
}
+#ifdef _WIN64
+int interlocked_cmpxchg128( __int64 *dest, __int64 xchg_high, __int64 xchg_low, __int64 *compare )
+{
+ int retv;
+ pthread_mutex_lock( &interlocked_mutex );
+ if (dest[0] == compare[0] && dest[1] == compare[1])
+ {
+ dest[0] = xchg_low;
+ dest[1] = xchg_high;
+ retv = 1;
+ }
+ else
+ {
+ compare[0] = dest[0];
+ compare[1] = dest[1];
+ retv = 0;
+ }
+ pthread_mutex_unlock( &interlocked_mutex );
+ return retv;
+}
+#endif
+
#endif
More information about the wine-cvs
mailing list