summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-02-01 14:53:41 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-02-01 14:56:05 +0200
commit4b291588bb374ec72fd19202911abe949fc0c7c2 (patch)
treef736d37fce20cece5cecc08446635d1bfe171c29
parentd87b725eebbddb6d319ee99e51924a62635185a1 (diff)
downloadmariadb-git-4b291588bb374ec72fd19202911abe949fc0c7c2.tar.gz
MDEV-19845: Make my_cpu.h self-contained
Fix up commit f5c080c7353cc9c30d0b269c07024cd38253c3bc
-rw-r--r--include/my_cpu.h9
-rw-r--r--mysys/my_cpu.c3
-rw-r--r--storage/innobase/include/ib0mutex.h3
3 files changed, 10 insertions, 5 deletions
diff --git a/include/my_cpu.h b/include/my_cpu.h
index 0e37eafe60e..b7d7008a8e3 100644
--- a/include/my_cpu.h
+++ b/include/my_cpu.h
@@ -1,6 +1,6 @@
#ifndef MY_CPU_INCLUDED
#define MY_CPU_INCLUDED
-/* Copyright (c) 2013, MariaDB foundation Ab and SkySQL
+/* Copyright (c) 2013, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,6 +50,13 @@
# define HAVE_PAUSE_INSTRUCTION /* added in Intel Pentium 4 */
#endif
+#ifdef _WIN32
+#elif defined HAVE_PAUSE_INSTRUCTION
+#elif defined(_ARCH_PWR8)
+#else
+# include "my_atomic.h"
+#endif
+
static inline void MY_RELAX_CPU(void)
{
#ifdef _WIN32
diff --git a/mysys/my_cpu.c b/mysys/my_cpu.c
index 72705263aae..52500d78ef7 100644
--- a/mysys/my_cpu.c
+++ b/mysys/my_cpu.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019, MariaDB Corporation.
+/* Copyright (c) 2019, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <my_global.h>
-#include <my_atomic.h>
#include <my_cpu.h>
#include <my_rdtsc.h>
diff --git a/storage/innobase/include/ib0mutex.h b/storage/innobase/include/ib0mutex.h
index 960cafe5cdb..ce0e911dbb4 100644
--- a/storage/innobase/include/ib0mutex.h
+++ b/storage/innobase/include/ib0mutex.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -29,7 +29,6 @@ Created 2013-03-26 Sunny Bains.
#ifndef ib0mutex_h
#define ib0mutex_h
-#include "my_atomic.h"
#include "my_cpu.h"
#include "os0event.h"
#include "sync0arr.h"