Commit de4116a1 authored by Mikael Ronstrom's avatar Mikael Ronstrom

Added support for rep; nop replacing PAUSE due to Solaris bug

Replaced abs_top_srcdir with top_srcdir, not sure it's an
improvement but at least it's known that abs_top_srcdir
in cases have a problem and this is a more common variable
to use for the same purpose.
parent 226e78ae
......@@ -2371,9 +2371,24 @@ AC_TRY_RUN([
[x86_pause_exists=no],
[x86_pause_exists=no] # Cross-compile, assume no PAUSE instruction
)
AC_TRY_RUN([
int main() {
__asm__ __volatile__ ("rep; nop");
return 0;
}
],
[x86_fake_pause_exists=yes],
[x86_fake_pause_exists=no],
[x86_fake_pause_exists=no] # Cross-compile, assume no x86 NOP instruction
)
if test "$x86_pause_exists" = "yes"
then
AC_DEFINE([HAVE_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
else
if test "$x86_fake_pause_exists" = "yes"
then
AC_DEFINE([HAVE_FAKE_PAUSE_INSTRUCTION], [1], [Does x86 NOP instruction exist])
fi
fi
# Check if pthread_attr_setscope() exists
......
......@@ -131,7 +131,7 @@ libmysys_a_LIBADD += probes_mysql.o
libmysys_a_DEPENDENCIES += probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = mf_keycache.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -212,7 +212,7 @@ libndb_la_DEPENDENCIES = dtrace_files dtrace_providers probes_libndb.o
mysqld_LDADD += probes_all.o
mysqld_DEPENDENCIES += dtrace_files dtrace_providers probes_all.o
CLEANFILES += dtrace_files dtrace_providers probes_all.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -72,7 +72,7 @@ libarchive_a_LIBADD = probes_mysql.o
libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libarchive_a-ha_archive.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -54,7 +54,7 @@ libblackhole_a_LIBADD = probes_mysql.o
libblackhole_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libblackhole_a-ha_blackhole.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -47,7 +47,7 @@ libcsv_a_LIBADD = probes_mysql.o
libcsv_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libcsv_a-ha_tina.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -55,7 +55,7 @@ libexample_a_DEPENDENCIES = probes_mysql.o
CLEANFILES =
BUILT_SOURCES =
DTRACEFILES = libexample_a-ha_example.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -54,7 +54,7 @@ libfederated_a_LIBADD = probes_mysql.o
libfederated_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = libfederated_a-ha_federated.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -56,7 +56,7 @@ libheap_a_LIBADD = probes_mysql.o
libheap_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = ha_heap.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -20,6 +20,9 @@ typedef time_t ib_time_t;
#ifdef HAVE_PAUSE_INSTRUCTION
#define PAUSE_INSTRUCTION() {__asm__ __volatile__ ("pause");}
#else
#ifdef HAVE_FAKE_PAUSE_INSTRUCTION
#define PAUSE_INSTRUCTION() {__asm__ __volatile__ ("rep; nop");}
#else
#ifdef UNIV_SYNC_ATOMIC
#define PAUSE_INSTRUCTION() \
{ \
......@@ -30,6 +33,7 @@ typedef time_t ib_time_t;
#define PAUSE_INSTRUCTION()
#endif
#endif
#endif
/************************************************************
Gets the high 32 bits in a ulint. That is makes a shift >> 32,
......
......@@ -155,7 +155,7 @@ libmyisam_a_LIBADD = probes_mysql.o
libmyisam_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES += probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = ha_myisam.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
......@@ -45,7 +45,7 @@ libmyisammrg_a_LIBADD = probes_mysql.o
libmyisammrg_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
DTRACEFILES = ha_myisammrg.o
DTRACEPROVIDER = $(abs_top_srcdir)/sql/probes_mysql.d
DTRACEPROVIDER = $(top_srcdir)/sql/probes_mysql.d
dtrace_files:
echo $(DTRACEFILES) > $@
......
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