Call to GDK_THREADS_ENTER in gtk_main



The function gtk_main contains the code.

if (g_main_loop_is_running (main_loops->data))
   {
     GDK_THREADS_LEAVE ();
     g_main_loop_run (loop);
     GDK_THREADS_ENTER ();
     gdk_flush ();
   }

When GDK_THREADS_LEAVE is called do we expect the mutex to be locked?

If yes, what code locks it?

If no, should GDK_THREADS_ENTER be called previously so that the mutex_unlock call does not fail?

Padraig



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