summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-05-30 00:04:05 -0400
committerRyan Lortie <desrt@desrt.ca>2013-05-31 23:03:19 -0400
commit210b1f8b4230b881d1c2e4a9e7dac571c967e091 (patch)
treec856abf9df267f5cac31d050845e635a6cbafc2d
parente66abbe2ef574b1ff5c36588bbac7267f04e5abe (diff)
Remove a bunch of lingering g_thread_init()
After this patch, there is but one remaining use of g_thread_init(), which is in tests/slice-threadinit.c, a testcase dedicated to testing the functionality of gslice across a g_thread_init() boundary. This testcase is pretty meaningless these days... probably we should delete it.
-rw-r--r--tests/asyncqueue-test.c2
-rw-r--r--tests/child-test.c3
-rw-r--r--tests/gobject/performance-threaded.c3
-rw-r--r--tests/mainloop-test.c4
-rw-r--r--tests/onceinit.c2
-rw-r--r--tests/slice-test.c2
-rw-r--r--tests/thread-test.c1
-rw-r--r--tests/threadpool-test.c2
8 files changed, 1 insertions, 18 deletions
diff --git a/tests/asyncqueue-test.c b/tests/asyncqueue-test.c
index bdc53033f..cc598ded5 100644
--- a/tests/asyncqueue-test.c
+++ b/tests/asyncqueue-test.c
@@ -185,8 +185,6 @@ main (int argc, char *argv[])
gint sort_interval;
gchar *msg G_GNUC_UNUSED;
- g_thread_init (NULL);
-
basic_tests ();
PRINT_MSG (("creating async queue..."));
diff --git a/tests/child-test.c b/tests/child-test.c
index ec36b2499..5478b6fc8 100644
--- a/tests/child-test.c
+++ b/tests/child-test.c
@@ -164,9 +164,6 @@ main (int argc, char *argv[])
}
#endif
-#ifdef TEST_THREAD
- g_thread_init (NULL);
-#endif
main_loop = g_main_loop_new (NULL, FALSE);
#ifdef G_OS_WIN32
diff --git a/tests/gobject/performance-threaded.c b/tests/gobject/performance-threaded.c
index 76f153fe6..a7bd7c00f 100644
--- a/tests/gobject/performance-threaded.c
+++ b/tests/gobject/performance-threaded.c
@@ -357,9 +357,6 @@ main (int argc,
return 0;
}
- if (n_threads)
- g_thread_init (NULL);
-
if (argc > 1)
{
for (i = 1; i < argc; i++)
diff --git a/tests/mainloop-test.c b/tests/mainloop-test.c
index f4a805e3c..14245b735 100644
--- a/tests/mainloop-test.c
+++ b/tests/mainloop-test.c
@@ -398,14 +398,12 @@ recurser_start (gpointer data)
return TRUE;
}
-int
+int
main (int argc,
char *argv[])
{
gint i;
- g_thread_init (NULL);
-
context_array = g_ptr_array_new ();
crawler_array = g_ptr_array_new ();
diff --git a/tests/onceinit.c b/tests/onceinit.c
index f142fbff8..89ba6a136 100644
--- a/tests/onceinit.c
+++ b/tests/onceinit.c
@@ -124,8 +124,6 @@ main (int argc,
g_assert (p == &dummy_value);
p = initializer2();
g_assert (p == &dummy_value);
- /* setup threads */
- g_thread_init (NULL);
/* start multiple threads for initializer3() */
g_mutex_lock (&tmutex);
for (i = 0; i < N_THREADS; i++)
diff --git a/tests/slice-test.c b/tests/slice-test.c
index 9ff96aedd..519c81b36 100644
--- a/tests/slice-test.c
+++ b/tests/slice-test.c
@@ -264,8 +264,6 @@ main (int argc,
seedp = &seed32;
}
- g_thread_init (NULL);
-
if (argc <= 1)
usage();
diff --git a/tests/thread-test.c b/tests/thread-test.c
index 93c01585e..eeb96869a 100644
--- a/tests/thread-test.c
+++ b/tests/thread-test.c
@@ -382,7 +382,6 @@ int
main (int argc,
char *argv[])
{
- g_thread_init (NULL);
run_all_tests ();
/* Now we rerun all tests, but this time we fool the system into
diff --git a/tests/threadpool-test.c b/tests/threadpool-test.c
index 07420df18..71f8a68d2 100644
--- a/tests/threadpool-test.c
+++ b/tests/threadpool-test.c
@@ -452,8 +452,6 @@ test_check_start_and_stop (gpointer user_data)
int
main (int argc, char *argv[])
{
- g_thread_init (NULL);
-
DEBUG_MSG (("Starting... (in one second)"));
g_timeout_add (1000, test_check_start_and_stop, NULL);