Threads are not used anywhere within ofono so there's no point in having a configure option to enable threading in GLib or DBus. I think this is mostly a leftover from when ofono underwent mitosis from Connman...? :) --- configure.ac | 8 -------- src/main.c | 12 ------------ tools/auto-enable.c | 12 ------------ tools/huawei-audio.c | 12 ------------ 4 files changed, 44 deletions(-)
diff --git a/configure.ac b/configure.ac index 79436adc..a22b0b11 100644 --- a/configure.ac +++ b/configure.ac @@ -68,14 +68,6 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes, AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) -if (test "${enable_threads}" = "yes"); then - AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required]) - PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, - AC_MSG_ERROR(GThread >= 2.16 is required)) - GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" - GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" -fi - PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes, AC_MSG_ERROR(D-Bus >= 1.4 is required)) AC_SUBST(DBUS_CFLAGS) diff --git a/src/main.c b/src/main.c index 2d359dde..2c1b23a0 100644 --- a/src/main.c +++ b/src/main.c @@ -211,11 +211,6 @@ int main(int argc, char **argv) struct ell_event_source *source; #endif -#ifdef NEED_THREADS - if (g_thread_supported() == FALSE) - g_thread_init(NULL); -#endif - context = g_option_context_new(NULL); g_option_context_add_main_entries(context, options, NULL); @@ -246,13 +241,6 @@ int main(int argc, char **argv) event_loop = g_main_loop_new(NULL, FALSE); -#ifdef NEED_THREADS - if (dbus_threads_init_default() == FALSE) { - fprintf(stderr, "Can't init usage of threads\n"); - exit(1); - } -#endif - #ifdef HAVE_ELL l_log_set_stderr(); l_debug_enable("*"); diff --git a/tools/auto-enable.c b/tools/auto-enable.c index 87fb0a8d..1fb23401 100644 --- a/tools/auto-enable.c +++ b/tools/auto-enable.c @@ -492,11 +492,6 @@ int main(int argc, char **argv) guint watch; struct sigaction sa; -#ifdef NEED_THREADS - if (g_thread_supported() == FALSE) - g_thread_init(NULL); -#endif - context = g_option_context_new(NULL); g_option_context_add_main_entries(context, options, NULL); @@ -518,13 +513,6 @@ int main(int argc, char **argv) main_loop = g_main_loop_new(NULL, FALSE); -#ifdef NEED_THREADS - if (dbus_threads_init_default() == FALSE) { - fprintf(stderr, "Can't init usage of threads\n"); - exit(1); - } -#endif - dbus_error_init(&err); conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, &err); diff --git a/tools/huawei-audio.c b/tools/huawei-audio.c index 9997a581..b22b50a3 100644 --- a/tools/huawei-audio.c +++ b/tools/huawei-audio.c @@ -775,11 +775,6 @@ int main(int argc, char **argv) guint watch; struct sigaction sa; -#ifdef NEED_THREADS - if (g_thread_supported() == FALSE) - g_thread_init(NULL); -#endif - context = g_option_context_new(NULL); g_option_context_add_main_entries(context, options, NULL); @@ -801,13 +796,6 @@ int main(int argc, char **argv) main_loop = g_main_loop_new(NULL, FALSE); -#ifdef NEED_THREADS - if (dbus_threads_init_default() == FALSE) { - fprintf(stderr, "Can't init usage of threads\n"); - exit(1); - } -#endif - dbus_error_init(&err); conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, &err); -- 2.14.1 _______________________________________________ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono