List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:July 9 2008 1:04am
Subject:bzr commit into mysql-6.0-falcon branch (vvaintroub:2725)
View as plain text  
#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-6.0-falcon/

 2725 Vladislav Vaintroub	2008-07-09
      Not to push, pleae ignore
modified:
  storage/falcon/Interlock.h

=== modified file 'storage/falcon/Interlock.h'
--- a/storage/falcon/Interlock.h	2008-06-26 22:04:56 +0000
+++ b/storage/falcon/Interlock.h	2008-07-08 23:04:22 +0000
@@ -90,6 +90,9 @@ inline int inline_cas (volatile int *tar
 	*/
 	return COMPARE_EXCHANGE((volatile long *) target, compare, exchange);
 #elif (defined(__i386) || defined(__x86_64__)) && defined(__GNUC__)
+#if(__GNUC__  > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 1))
+        return (char)__sync_bool_compare_and_swap (target, compare, exchange);
+#else
 	char ret;
 	__asm__ __volatile__ (
 		"lock\n\t"
@@ -100,6 +103,7 @@ inline int inline_cas (volatile int *tar
 		: "cc", "memory"
 		);
 	return ret;
+#endif
 #elif defined(__ppc__) || defined(__powerpc__)
 	char ret= 0, tmp;
 	__asm__ __volatile__ (
@@ -160,6 +164,9 @@ inline char inline_cas_pointer (volatile
 #ifdef _WIN32
 	return COMPARE_EXCHANGE_POINTER(target, compare, exchange);
 #elif (defined(__i386) || defined(__x86_64__)) && defined(__GNUC__)
+#if(__GNUC__  > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 1))
+        return (char)__sync_bool_compare_and_swap (target, compare, exchange);
+#else
 	char ret;
 	__asm__ __volatile__ (
 		"lock\n\t"
@@ -169,6 +176,7 @@ inline char inline_cas_pointer (volatile
 		: "r" (exchange), "a" (compare)
 		: "cc", "memory");
 	return ret;
+#endif
 #elif defined(__ppc__) || defined(__powerpc__)
 	void *ret;
 	if (sizeof(void*) == 8)

Thread
bzr commit into mysql-6.0-falcon branch (vvaintroub:2725) Vladislav Vaintroub9 Jul