Преглед изворни кода

Disable the main part of starpu top core when it is not enabled

Samuel Thibault пре 12 година
родитељ
комит
fef54243b2
2 измењених фајлова са 6 додато и 0 уклоњено
  1. 4 0
      configure.ac
  2. 2 0
      src/top/starpu_top_connection.c

+ 4 - 0
configure.ac

@@ -1183,6 +1183,10 @@ else
   build_starpu_top=no
 fi
 
+if test "x$build_starpu_top" != "xno" ; then
+	AC_DEFINE(STARPU_TOP, [1], [Define this to 1 to enable building StarPU Top])
+fi
+
 AM_CONDITIONAL(BUILD_STARPU_TOP, test x$build_starpu_top = xyes)
 
 ###############################################################################

+ 2 - 0
src/top/starpu_top_connection.c

@@ -100,6 +100,7 @@ void * message_to_ui(void * p)
 
 void _starpu_top_communications_threads_launcher(void)
 {
+#ifdef STARPU_TOP
 	pthread_t from_ui;
 	pthread_t to_ui;
 	pthread_attr_t threads_attr;
@@ -164,5 +165,6 @@ void _starpu_top_communications_threads_launcher(void)
 
 	_STARPU_PTHREAD_CREATE(&from_ui, &threads_attr, message_from_ui, NULL);
 	_STARPU_PTHREAD_CREATE(&to_ui, &threads_attr, message_to_ui, NULL);
+#endif
 }