Don't use the thread_exit vfunc
[platform/upstream/glib.git] / glib / gthread-win32.c
index 23a8dfb..f26ff4c 100644 (file)
@@ -371,8 +371,8 @@ g_thread_self_win32_impl (gpointer thread)
   *(GThreadData **)thread = self;
 }
 
-static void
-g_thread_exit_win32_impl (void)
+void
+g_system_thread_exit (void)
 {
   GThreadData *self = TlsGetValue (g_thread_self_tls);
   gboolean dtors_called;
@@ -431,7 +431,7 @@ g_thread_proxy (gpointer data)
 
   self->func (self->data);
 
-  g_thread_exit_win32_impl ();
+  g_system_thread_exit ();
 
   g_assert_not_reached ();
 
@@ -499,6 +499,13 @@ g_thread_join_win32_impl (gpointer thread)
   g_free (target);
 }
 
+gboolean
+g_system_thread_equal (gpointer thread1,
+                       gpointer thread2)
+{
+   return ((GSystemThread*)thread1)->dummy_pointer == ((GSystemThread*)thread2)->dummy_pointer;
+}
+
 /* {{{1 SRWLock and CONDITION_VARIABLE emulation (for Windows XP) */
 
 static CRITICAL_SECTION g_thread_xp_lock;
@@ -800,10 +807,10 @@ GThreadFunctions g_thread_functions_for_glib_use =
   g_thread_create_win32_impl,       /* thread */
   g_thread_yield,
   g_thread_join_win32_impl,
-  g_thread_exit_win32_impl,
+  g_system_thread_exit,
   g_thread_set_priority_win32_impl,
   g_thread_self_win32_impl,
-  NULL                             /* no equal function necessary */
+  g_system_thread_equal
 };
 
 void