[Commits] Rev 4297: MDEV-5756 CMake option to build without thread pool. in file:///home/hf/wmar/mdev-5756/

holyfoot at askmonty.org holyfoot at askmonty.org
Tue Jul 22 11:10:03 EEST 2014


At file:///home/hf/wmar/mdev-5756/

------------------------------------------------------------
revno: 4297
revision-id: holyfoot at askmonty.org-20140722054928-jvv6gq32xl9hu26h
parent: jplindst at mariadb.org-20140722071056-amuyezppnqy1vm8r
committer: Alexey Botchkov <holyfoot at askmonty.org>
branch nick: mdev-5756
timestamp: Tue 2014-07-22 10:49:28 +0500
message:
  MDEV-5756 CMake option to build without thread pool.
    Check if the threadpool is available on the system and set HAVE_POOL_OF_THREADS respectively.
-------------- next part --------------
=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2014-07-08 17:34:53 +0000
+++ b/sql/CMakeLists.txt	2014-07-22 05:49:28 +0000
@@ -30,7 +30,15 @@ ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h 
 
 SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED 1)
 
-ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS) 
+ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER) 
+
+IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
+    CMAKE_SYSTEM_NAME MATCHES "Windows" OR
+    CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
+    HAVE_KQUEUE)
+ ADD_DEFINITIONS(-DHAVE_POOL_OF_THREADS) 
+ENDIF()
+
 IF(SSL_DEFINES)
  ADD_DEFINITIONS(${SSL_DEFINES})
 ENDIF()

=== modified file 'sql/scheduler.h'
--- a/sql/scheduler.h	2014-03-26 21:25:38 +0000
+++ b/sql/scheduler.h	2014-07-22 05:49:28 +0000
@@ -99,15 +99,13 @@ struct thd_scheduler
   void *data;                  /* scheduler-specific data structure */
 };
 
-#undef HAVE_POOL_OF_THREADS
-#if !defined(EMBEDDED_LIBRARY) && !defined(_AIX)
-#define HAVE_POOL_OF_THREADS 1
+#ifdef HAVE_POOL_OF_THREADS
 void pool_of_threads_scheduler(scheduler_functions* func,
    ulong *arg_max_connections,
    uint *arg_connection_count);
 #else
 #define pool_of_threads_scheduler(A,B,C) \
   one_thread_per_connection_scheduler(A, B, C)
-#endif
+#endif /*HAVE_POOL_OF_THREADS*/
 
 #endif /* SCHEDULER_INCLUDED */



More information about the commits mailing list