/* If another thread is waiting for us using g_thread_join() then the waiting thread will be woken up and get */
void g_thread_exit(gpointer retval)
/* If another thread is waiting for us using g_thread_join() then the waiting thread will be woken up and get */
void g_thread_exit(gpointer retval)
{
  GRealThread* real = (GRealThread*) g_thread_self ();
  if G_UNLIKELY (!real->ours)
    g_error ("attempt to g_thread_exit() a thread not created by GLib");
  real->retval = retval;
  g_system_thread_exit ();
}