diff options
author | Dan Winship <danw@gnome.org> | 2011-08-31 14:01:45 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-09-09 12:41:55 -0400 |
commit | 5bc7729d16b641022f5eb8a4022515a163063ce9 (patch) | |
tree | 5a3e9d6b9a6a6754af856dc55ef9827ce04d33e6 /tests | |
parent | 0d1a2eb4bfcd733e0c015c76fb0ca0308b8a61f0 (diff) |
Make threads mandatory
G_THREADS_ENABLED still exists, but is always defined. It is still
possible to use libglib without threads, but gobject (and everything
above it) is now guaranteed to be using threads (as, in fact, it was
before, since it was accidentally impossible to compile with
--disable-threads).
https://bugzilla.gnome.org/show_bug.cgi?id=616754
Diffstat (limited to 'tests')
-rw-r--r-- | tests/asyncqueue-test.c | 2 | ||||
-rw-r--r-- | tests/child-test.c | 6 | ||||
-rw-r--r-- | tests/mainloop-test.c | 4 | ||||
-rw-r--r-- | tests/thread-test.c | 4 | ||||
-rw-r--r-- | tests/threadpool-test.c | 5 |
5 files changed, 1 insertions, 20 deletions
diff --git a/tests/asyncqueue-test.c b/tests/asyncqueue-test.c index 588baa3d1..bdc53033f 100644 --- a/tests/asyncqueue-test.c +++ b/tests/asyncqueue-test.c @@ -178,7 +178,6 @@ basic_tests (void) int main (int argc, char *argv[]) { -#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE) gint i; gint max_threads = MAX_THREADS; gint max_unused_threads = MAX_THREADS; @@ -239,7 +238,6 @@ main (int argc, char *argv[]) main_loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (main_loop); -#endif return EXIT_SUCCESS; } diff --git a/tests/child-test.c b/tests/child-test.c index a6e307dfa..2fbc741d8 100644 --- a/tests/child-test.c +++ b/tests/child-test.c @@ -163,10 +163,7 @@ main (int argc, char *argv[]) exit (STILL_ACTIVE); } #endif - /* Only run the test, if threads are enabled and a default thread - * implementation is available. - */ -#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE) + #ifdef TEST_THREAD g_thread_init (NULL); #endif @@ -201,6 +198,5 @@ main (int argc, char *argv[]) return 1; } -#endif return 0; } diff --git a/tests/mainloop-test.c b/tests/mainloop-test.c index cf38e090b..206f80e17 100644 --- a/tests/mainloop-test.c +++ b/tests/mainloop-test.c @@ -402,9 +402,6 @@ int main (int argc, char *argv[]) { - /* Only run the test, if threads are enabled and a default thread - implementation is available */ -#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE) gint i; g_thread_init (NULL); @@ -437,6 +434,5 @@ main (int argc, g_main_loop_run (main_loop); g_main_loop_unref (main_loop); -#endif return 0; } diff --git a/tests/thread-test.c b/tests/thread-test.c index 63f7e02be..709c38718 100644 --- a/tests/thread-test.c +++ b/tests/thread-test.c @@ -384,9 +384,6 @@ int main (int argc, char *argv[]) { - /* Only run the test, if threads are enabled and a default thread - implementation is available */ -#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE) g_thread_init (NULL); run_all_tests (); @@ -397,6 +394,5 @@ main (int argc, g_thread_use_default_impl = FALSE; run_all_tests (); -#endif return 0; } diff --git a/tests/threadpool-test.c b/tests/threadpool-test.c index cc22103ef..bb96c9e3a 100644 --- a/tests/threadpool-test.c +++ b/tests/threadpool-test.c @@ -466,10 +466,6 @@ test_check_start_and_stop (gpointer user_data) int main (int argc, char *argv[]) { - /* Only run the test, if threads are enabled and a default thread - implementation is available */ - -#if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE) g_thread_init (NULL); DEBUG_MSG (("Starting... (in one second)")); @@ -477,7 +473,6 @@ main (int argc, char *argv[]) main_loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (main_loop); -#endif return 0; } |