Commit 69bf228c authored by vasil's avatar vasil

branches/zip:

Move the check whether to include ut0auxconf.h before everything because
we are now even checking for GCC atomics, we relied on MySQL to define
this macro before.
parent 96c1bc32
......@@ -122,6 +122,18 @@ if we are compiling on Windows. */
# include <sched.h>
# endif
/* if any of the following macros is defined at this point this means
that the code from the "right" plug.in was executed and we do not
need to include ut0auxconf.h which would either define the same macros
or will be empty */
#if !defined(HAVE_IB_GCC_ATOMIC_BUILTINS) \
&& !defined(HAVE_ATOMIC_PTHREAD_T) \
&& !defined(HAVE_SOLARIS_ATOMICS) \
&& !defined(SIZEOF_PTHREAD_T) \
&& !defined(IB_HAVE_PAUSE_INSTRUCTION)
# include "ut0auxconf.h"
#endif
# if defined(HAVE_IB_GCC_ATOMIC_BUILTINS) || defined(HAVE_SOLARIS_ATOMICS) \
|| defined(HAVE_WINDOWS_ATOMICS)
/* If atomics are defined we use them in InnoDB mutex implementation */
......@@ -129,19 +141,7 @@ if we are compiling on Windows. */
# endif /* (HAVE_IB_GCC_ATOMIC_BUILTINS) || (HAVE_SOLARIS_ATOMICS)
|| (HAVE_WINDOWS_ATOMICS) */
/* For InnoDB rw_locks to work with atomics we need the thread_id
to be no more than machine word wide. The following enables using
atomics for InnoDB rw_locks where these conditions are met. */
#ifdef HAVE_ATOMIC_BUILTINS
/* if HAVE_ATOMIC_PTHREAD_T is defined at this point that means that
the code from plug.in has defined it and we do not need to include
ut0auxconf.h which would either define HAVE_ATOMIC_PTHREAD_T or will
be empty */
# ifndef HAVE_ATOMIC_PTHREAD_T
# include "ut0auxconf.h"
# endif /* HAVE_ATOMIC_PTHREAD_T */
/* now HAVE_ATOMIC_PTHREAD_T is eventually defined either by plug.in or
from Makefile.in->ut0auxconf.h */
# ifdef HAVE_ATOMIC_PTHREAD_T
# define INNODB_RW_LOCKS_USE_ATOMICS
# endif /* HAVE_ATOMIC_PTHREAD_T */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment