Skip to content

Commit c05273c

Browse files
author
Ole John Aske
committed
Merge 7.2 -> 7.3
2 parents 69cae58 + acf4ed3 commit c05273c

File tree

4 files changed

+25
-60
lines changed

4 files changed

+25
-60
lines changed

storage/ndb/ndb_configure.cmake

+1-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
33
#
44
# This program is free software; you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -179,36 +179,6 @@ HAVE_LINUX_FUTEX)
179179
OPTION(WITH_NDBMTD
180180
"Build the MySQL Cluster multithreadded data node" ON)
181181

182-
IF(WITH_NDBMTD)
183-
# checking atomic.h needed for spinlock's on sparc and Sun Studio
184-
CHECK_INCLUDE_FILES(atomic.h HAVE_ATOMIC_H)
185-
186-
# checking assembler needed for ndbmtd
187-
CHECK_CXX_SOURCE_RUNS("
188-
#define HAVE_ATOMIC_H ${HAVE_ATOMIC_H}
189-
#include \"${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/vm/mt-asm.h\"
190-
int main()
191-
{
192-
unsigned int a = 0;
193-
volatile unsigned int *ap = (volatile unsigned int*)&a;
194-
#ifdef NDB_HAVE_XCNG
195-
a = xcng(ap, 1);
196-
cpu_pause();
197-
#endif
198-
mb();
199-
* ap = 2;
200-
rmb();
201-
* ap = 1;
202-
wmb();
203-
* ap = 0;
204-
read_barrier_depends();
205-
return a;
206-
}"
207-
NDB_BUILD_NDBMTD)
208-
ELSE()
209-
SET(NDB_BUILD_NDBMTD CACHE INTERNAL "")
210-
ENDIF()
211-
212182
SET(WITH_NDB_PORT "" CACHE INTEGER
213183
"Default port used by MySQL Cluster management server")
214184
IF(WITH_NDB_PORT GREATER 0)

storage/ndb/src/kernel/CMakeLists.txt

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ SET(NDBD_LIBS ndbblocks ndbkernel ndberror ndbtransport
4747
)
4848

4949
IF(WIN32)
50-
# Add the rseource files for logging to event log
50+
# Add the resource files for logging to event log
5151
SET(NDBD_EXTRA_SRC
5252
${CMAKE_SOURCE_DIR}/storage/ndb/src/common/logger/message.rc
5353
${CMAKE_SOURCE_DIR}/storage/ndb/src/common/logger/msg00001.bin)
@@ -59,10 +59,8 @@ MYSQL_ADD_EXECUTABLE(ndbd
5959
COMPONENT ClusterDataNode)
6060
TARGET_LINK_LIBRARIES(ndbd ${NDBD_LIBS} ndbsched ${LIBDL})
6161

62-
IF(NDB_BUILD_NDBMTD)
63-
MYSQL_ADD_EXECUTABLE(ndbmtd
64-
main.cpp ndbd.cpp angel.cpp SimBlockList.cpp ${NDBD_EXTRA_SRC}
65-
DESTINATION ${INSTALL_SBINDIR}
66-
COMPONENT ClusterDataNode)
67-
TARGET_LINK_LIBRARIES(ndbmtd ${NDBD_LIBS} ndbsched_mt ${LIBDL})
68-
ENDIF()
62+
MYSQL_ADD_EXECUTABLE(ndbmtd
63+
main.cpp ndbd.cpp angel.cpp SimBlockList.cpp ${NDBD_EXTRA_SRC}
64+
DESTINATION ${INSTALL_SBINDIR}
65+
COMPONENT ClusterDataNode)
66+
TARGET_LINK_LIBRARIES(ndbmtd ${NDBD_LIBS} ndbsched_mt ${LIBDL})

storage/ndb/src/kernel/vm/CMakeLists.txt

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -52,15 +52,13 @@ ADD_CONVENIENCE_LIBRARY(ndbsched
5252
dummy_nonmt.cpp
5353
)
5454

55-
IF(NDB_BUILD_NDBMTD)
56-
ADD_CONVENIENCE_LIBRARY(ndbsched_mt
57-
SimulatedBlock_mt.cpp
58-
TransporterCallback_mt.cpp
59-
LongSignal_mt.cpp
60-
SimplePropertiesSection_mt.cpp
61-
mt.cpp
62-
dummy_mt.cpp)
63-
ENDIF()
55+
ADD_CONVENIENCE_LIBRARY(ndbsched_mt
56+
SimulatedBlock_mt.cpp
57+
TransporterCallback_mt.cpp
58+
LongSignal_mt.cpp
59+
SimplePropertiesSection_mt.cpp
60+
mt.cpp
61+
dummy_mt.cpp)
6462

6563
ADD_CONVENIENCE_LIBRARY(ndbtest
6664
test_context.cpp
@@ -79,8 +77,6 @@ FOREACH(testprog CountingPool DynArr256 IntrusiveList LHLevel)
7977
ndbtransport ndbmgmcommon ndbmgmapi ndbportlib ndbgeneral)
8078
ENDFOREACH(testprog)
8179

82-
IF(NDB_BUILD_NDBMTD)
83-
ADD_EXECUTABLE(mt-send-t mt-send-t.cpp)
84-
TARGET_LINK_LIBRARIES(mt-send-t ndbtest ndbkernel ndbsched ndberror
85-
ndbtransport ndbmgmcommon ndbmgmapi ndbportlib ndbgeneral)
86-
ENDIF()
80+
ADD_EXECUTABLE(mt-send-t mt-send-t.cpp)
81+
TARGET_LINK_LIBRARIES(mt-send-t ndbtest ndbkernel ndbsched ndberror
82+
ndbtransport ndbmgmcommon ndbmgmapi ndbportlib ndbgeneral)

storage/ndb/src/kernel/vm/mt-asm.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
3232
/********************
3333
* GCC
3434
*******************/
35-
#if defined(__x86_64__) || defined (__i386__)
35+
#if defined(__x86_64__) || defined (__i386__) /* 64 or 32 bit x86 */
3636

3737
#define NDB_HAVE_MB
3838
#define NDB_HAVE_RMB
@@ -114,7 +114,7 @@ extern void cpu_pause();
114114
* TODO check that asm ("") implies a compiler barrier
115115
* i.e that it clobbers memory
116116
*/
117-
#if defined(__x86_64__)
117+
#if defined(__x86_64) || defined (__i386) /* 64 or 32 bit x86 */
118118
#define NDB_HAVE_MB
119119
#define NDB_HAVE_RMB
120120
#define NDB_HAVE_WMB
@@ -139,9 +139,10 @@ extern void cpu_pause();
139139
#define read_barrier_depends() do {} while(0)
140140
#else
141141
#define NDB_NO_ASM "Unsupported architecture (sun studio)"
142+
#error "Unsupported architecture (sun studio)"
142143
#endif
143144

144-
#if defined(__x86_64__) || defined(__sparc)
145+
#if defined(__x86_64) || defined (__i386) || defined(__sparc)
145146
/**
146147
* we should probably use assembler for x86 aswell...
147148
* but i'm not really sure how you do this in sun-studio :-(
@@ -164,7 +165,7 @@ xcng(volatile unsigned * addr, int val)
164165
return ret;
165166
}
166167
#define cpu_pause()
167-
#elif defined(__x86_64__)
168+
#elif defined(__x86_64) || defined (__i386)
168169
static inline
169170
int
170171
xcng(volatile unsigned * addr, int val)

0 commit comments

Comments
 (0)