List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:April 3 2008 5:56pm
Subject:bk commit into maria tree (serg:1.2595)
View as plain text  
Below is the list of changes that have just been committed into a local
maria repository of serg.  When serg 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-03 17:56:33+02:00, serg@stripped +1 -0
  --with-atomic-ops=smp now forces asm, disabling gcc build-ins

  configure.in@stripped, 2008-04-03 17:56:29+02:00, serg@stripped +26 -25
    --with-atomic-ops=smp now forces asm, disabling gcc build-ins

diff -Nrup a/configure.in b/configure.in
--- a/configure.in	2008-02-05 16:47:05 +01:00
+++ b/configure.in	2008-04-03 17:56:29 +02:00
@@ -1717,39 +1717,40 @@ AC_ARG_WITH([atomic-ops],
 	    AC_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
 	    [Implement atomic operations using pthread rwlocks or atomic CPU
              instructions for multi-processor (default) or uniprocessor
-             configuration]), , [with_atomic_ops=smp])
+             configuration]))
 case "$with_atomic_ops" in
   "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
                   [Assume single-CPU mode, no concurrency]) ;;
   "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
                   [Use pthread rwlocks for atomic ops]) ;;
   "smp") ;;
+  "")
+    AC_CACHE_CHECK([whether the compiler provides atomic builtins],
+                   [mysql_cv_gcc_atomic_builtins], [AC_TRY_RUN([
+      int main()
+      {
+        int foo= -10; int bar= 10;
+        if (!__sync_fetch_and_add(&foo, bar) || foo)
+          return -1;
+        bar= __sync_lock_test_and_set(&foo, bar);
+        if (bar || foo != 10)
+          return -1;
+        bar= __sync_val_compare_and_swap(&bar, foo, 15);
+        if (bar)
+          return -1;
+        return 0;
+      }
+    ], [mysql_cv_gcc_atomic_builtins=yes],
+       [mysql_cv_gcc_atomic_builtins=no],
+       [mysql_cv_gcc_atomic_builtins=no])])
+
+    if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then
+      AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
+                [Define to 1 if compiler provides atomic builtins.])
+    fi
+   ;;
    *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
 esac
-
-AC_CACHE_CHECK([whether the compiler provides atomic builtins],
-               [mysql_cv_gcc_atomic_builtins], [AC_TRY_RUN([
-  int main()
-  {
-    int foo= -10; int bar= 10;
-    if (!__sync_fetch_and_add(&foo, bar) || foo)
-      return -1;
-    bar= __sync_lock_test_and_set(&foo, bar);
-    if (bar || foo != 10)
-      return -1;
-    bar= __sync_val_compare_and_swap(&bar, foo, 15);
-    if (bar)
-      return -1;
-    return 0;
-  }
-], [mysql_cv_gcc_atomic_builtins=yes],
-   [mysql_cv_gcc_atomic_builtins=no],
-   [mysql_cv_gcc_atomic_builtins=no])])
-
-if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then
-  AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
-            [Define to 1 if compiler provides atomic builtins.])
-fi
 
 # Force static compilation to avoid linking problems/get more speed
 AC_ARG_WITH(mysqld-ldflags,
Thread
bk commit into maria tree (serg:1.2595)Sergei Golubchik3 Apr 2008
  • Re: bk commit into maria tree (serg:1.2595)Davi Arnaut3 Apr 2008
    • Re: bk commit into maria tree (serg:1.2595)Sergei Golubchik3 Apr 2008