[kdbus] Add SipHash algorithm
[platform/upstream/glib.git] / tests / thread-test.c
index 1684401..17ac41f 100644 (file)
@@ -277,7 +277,7 @@ test_g_static_rw_lock_thread (gpointer data)
 }
 
 static void
-test_g_static_rw_lock ()
+test_g_static_rw_lock (void)
 {
   GThread *threads[THREADS];
   guint i;
@@ -368,8 +368,8 @@ test_g_thread_once (void)
 }
 
 /* run all the tests */
-void
-run_all_tests()
+static void
+run_all_tests (void)
 {
   test_g_mutex ();
   test_g_static_rec_mutex ();
@@ -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
@@ -391,6 +390,11 @@ main (int   argc,
 
   g_thread_use_default_impl = FALSE;
   run_all_tests ();
-  
+
+  /* XXX: And this shows how silly the above non-native tests are */
+  g_static_rw_lock_free (&test_g_static_rw_lock_lock);
+  g_static_rec_mutex_free (&test_g_static_rec_mutex_mutex);
+  g_static_private_free (&test_g_static_private_private2);
+
   return 0;
 }