Deprecate g_thread_init()
[platform/upstream/glib.git] / gthread / gthread-impl.c
index f7d5860..82ef3a1 100644 (file)
  * MT safe
  */
 
-#include "config.h"
-
 #include "glib.h"
-#include "gthreadprivate.h"
-
-static gint g_thread_priority_map [G_THREAD_PRIORITY_URGENT + 1];
-
-#include G_THREAD_SOURCE
-
-#ifndef PRIORITY_LOW_VALUE
-# define PRIORITY_LOW_VALUE 0
-#endif
-
-#ifndef PRIORITY_URGENT_VALUE
-# define PRIORITY_URGENT_VALUE 0
-#endif
-
-#ifndef PRIORITY_NORMAL_VALUE
-# define PRIORITY_NORMAL_VALUE                                         \
-  ((PRIORITY_LOW_VALUE * 6 + PRIORITY_URGENT_VALUE * 4) / 10)
-#endif /* PRIORITY_NORMAL_VALUE */
-
-#ifndef PRIORITY_HIGH_VALUE
-# define PRIORITY_HIGH_VALUE                                           \
-  ((PRIORITY_NORMAL_VALUE + PRIORITY_URGENT_VALUE * 2) / 3)
-#endif /* PRIORITY_HIGH_VALUE */
 
 void
-g_thread_init (GThreadFunctions *init)
+g_thread_init (gpointer init)
 {
-  static gboolean already_done;
-
   if (init != NULL)
     g_warning ("GThread system no longer supports custom thread implementations.");
-
-  if (already_done)
-    return;
-
-  already_done = TRUE;
-
-#ifdef HAVE_G_THREAD_IMPL_INIT
-  g_thread_impl_init();
-#endif /* HAVE_G_THREAD_IMPL_INIT */
-
-  g_thread_functions_for_glib_use = g_thread_functions_for_glib_use_default;
-
-  g_thread_priority_map [G_THREAD_PRIORITY_LOW] = PRIORITY_LOW_VALUE;
-  g_thread_priority_map [G_THREAD_PRIORITY_NORMAL] = PRIORITY_NORMAL_VALUE;
-  g_thread_priority_map [G_THREAD_PRIORITY_HIGH] = PRIORITY_HIGH_VALUE;
-  g_thread_priority_map [G_THREAD_PRIORITY_URGENT] = PRIORITY_URGENT_VALUE;
-
-  g_thread_init_glib ();
 }
 
 void
-g_thread_init_with_errorcheck_mutexes (GThreadFunctions *vtable)
+g_thread_init_with_errorcheck_mutexes (gpointer vtable)
 {
   g_assert (vtable == NULL);
-
-  g_thread_init (NULL);
 }