Below is the list of changes that have just been committed into a local
6.0 repository of hakank. When hakank does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-04-29 17:50:14+02:00, hakank@lu0011.(none) +1 -0
Fix for
Bug#36400 Compiling Falcon on Solaris 10/x86 fails with Sun Studio 12
Problem was that on Solaris/x86 we ran into gcc assembler.
storage/falcon/Interlock.h@stripped, 2008-04-29 17:50:09+02:00, hakank@lu0011.(none) +11 -11
Fix for
Bug#36400 Compiling Falcon on Solaris 10/x86 fails with Sun Studio 12
Problem was that on Solaris/x86 we ran into gcc assembler.
diff -Nrup a/storage/falcon/Interlock.h b/storage/falcon/Interlock.h
--- a/storage/falcon/Interlock.h 2008-04-24 12:53:25 +02:00
+++ b/storage/falcon/Interlock.h 2008-04-29 17:50:09 +02:00
@@ -16,7 +16,7 @@
#ifndef __INTERLOCK_H
#define __INTERLOCK_H
-#if defined(__sparcv8) || defined(__sparcv9)
+#if defined(__sparcv8) || defined(__sparcv9) || defined(__sun)
#include <sys/atomic.h>
#endif
@@ -89,7 +89,7 @@ inline int inline_cas (volatile int *tar
Need to perform explicit type casting to make the compiler happy.
*/
return COMPARE_EXCHANGE((volatile long *) target, compare, exchange);
-#elif defined(__i386) || defined(__x86_64__)
+#elif (defined(__i386) || defined(__x86_64__)) && !defined(__sun)
char ret;
__asm__ __volatile__ (
"lock\n\t"
@@ -139,10 +139,10 @@ inline int inline_cas (volatile int *tar
);
return ret;
/*
- We are running Sun Studio on SPARC.
+ We are running Sun Studio on SPARC or x86
Todo: get assembler version of atomic_cas_uint().
*/
-#elif defined(__sparcv8) || defined(__sparcv9)
+#elif defined(__sparcv8) || defined(__sparcv9) || defined(__sun)
#if defined(__SunOS_5_10)
return (compare == atomic_cas_uint((volatile uint_t *)target, compare, exchange));
#else
@@ -159,7 +159,7 @@ inline char inline_cas_pointer (volatile
{
#ifdef _WIN32
return COMPARE_EXCHANGE_POINTER(target, compare, exchange);
-#elif defined(__i386) || defined(__x86_64__)
+#elif (defined(__i386) || defined(__x86_64__)) && !defined(__sun)
char ret;
__asm__ __volatile__ (
"lock\n\t"
@@ -249,10 +249,10 @@ inline char inline_cas_pointer (volatile
}
return ret;
/*
- We are running Sun Studio on SPARC.
+ We are running Sun Studio on SPARC or x86
Todo: get assembler version of atomic_cas_ptr().
*/
-#elif defined(__sparcv8) || defined(__sparcv9)
+#elif defined(__sparcv8) || defined(__sparcv9) || defined(__sun)
#if defined(__SunOS_5_10)
return (char)(compare == atomic_cas_ptr(target, compare, exchange));
#else
@@ -269,7 +269,7 @@ inline INTERLOCK_TYPE interlockedIncreme
{
#ifdef _WIN32
return InterlockedIncrement ((long*) ptr);
-#elif defined(__i386) || defined(__x86_64__)
+#elif (defined(__i386) || defined(__x86_64__)) && !defined(__sun)
INTERLOCK_TYPE ret = 1;
__asm__ __volatile__ (
"lock\n\t"
@@ -310,7 +310,7 @@ inline INTERLOCK_TYPE interlockedDecreme
{
#ifdef _WIN32
return InterlockedDecrement ((long*) ptr);
-#elif defined(__i386) || defined(__x86_64__)
+#elif (defined(__i386) || defined(__x86_64__)) && !defined(__sun)
INTERLOCK_TYPE ret = -1;
__asm__ __volatile__ (
"lock\n\t"
@@ -352,7 +352,7 @@ inline INTERLOCK_TYPE interlockedAdd(vol
{
#ifdef _WIN32
return InterlockedExchangeAdd((long*) addend, value);
-#elif defined(__i386) || defined(__x86_64__)
+#elif (defined(__i386) || defined(__x86_64__)) && !defined(__sun)
INTERLOCK_TYPE ret = value;
__asm__ __volatile__ (
"lock\n\t"
@@ -394,7 +394,7 @@ inline INTERLOCK_TYPE interlockedExchang
{
#ifdef _WIN32
return InterlockedExchange((long*) addend, value);
-#elif defined(__i386) || defined(__x86_64__)
+#elif (defined(__i386) || defined(__x86_64__)) && !defined(__sun)
long ret = value;
__asm__ __volatile__ (
"lock\n\t"
| Thread |
|---|
| • bk commit into 6.0 tree (hakank:1.2657) BUG#36400 | Hakan Kuecuekyilmaz | 29 Apr 2008 |