[glib/glib-2-32] Use non-deprecated api in tests



commit a2fd72d95844a3f74d43491a724b99e2bd8f8ff5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 13 00:46:39 2012 -0400

    Use non-deprecated api in tests
    
    https://bugzilla.gnome.org/show_bug.cgi?id=660851

 glib/tests/rec-mutex.c |    4 ++--
 glib/tests/rwlock.c    |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/glib/tests/rec-mutex.c b/glib/tests/rec-mutex.c
index 4fd6156..95ac03f 100644
--- a/glib/tests/rec-mutex.c
+++ b/glib/tests/rec-mutex.c
@@ -143,7 +143,7 @@ test_rec_mutex4 (void)
     g_rec_mutex_init (&locks[i]);
 
   for (i = 0; i < THREADS; i++)
-    threads[i] = g_thread_create (thread_func, NULL, TRUE, NULL);
+    threads[i] = g_thread_new ("test", thread_func, NULL);
 
   for (i = 0; i < THREADS; i++)
     g_thread_join (threads[i]);
@@ -203,7 +203,7 @@ test_mutex_perf (gconstpointer data)
   depth = c % 256;
 
   for (i = 0; i < n_threads - 1; i++)
-    threads[i] = g_thread_create (addition_thread, &x, TRUE, NULL);
+    threads[i] = g_thread_new ("test", addition_thread, &x);
 
   /* avoid measuring thread setup/teardown time */
   start_time = g_get_monotonic_time ();
diff --git a/glib/tests/rwlock.c b/glib/tests/rwlock.c
index 9d51b30..658009d 100644
--- a/glib/tests/rwlock.c
+++ b/glib/tests/rwlock.c
@@ -170,7 +170,7 @@ test_rwlock7 (void)
     g_rw_lock_init (&locks[i]);
 
   for (i = 0; i < THREADS; i++)
-    threads[i] = g_thread_create (thread_func, NULL, TRUE, NULL);
+    threads[i] = g_thread_new ("test", thread_func, NULL);
 
   for (i = 0; i < THREADS; i++)
     g_thread_join (threads[i]);
@@ -253,10 +253,10 @@ test_rwlock8 (void)
   g_rw_lock_init (&even_lock);
 
   for (i = 0; i < 2; i++)
-    writers[i] = g_thread_create (writer_func, GINT_TO_POINTER (i), TRUE, NULL);
+    writers[i] = g_thread_new ("a", writer_func, GINT_TO_POINTER (i));
 
   for (i = 0; i < 10; i++)
-    readers[i] = g_thread_create (reader_func, NULL, TRUE, NULL);
+    readers[i] = g_thread_new ("b", reader_func, NULL);
 
   for (i = 0; i < 2; i++)
     g_thread_join (writers[i]);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]