+void
+assert_is_wui_thread (const char *filename, int lineno)
+{
+ if (g_thread_self () != wui_gthread) {
+ fprintf (stderr, "%s:%d: internal error: this function should only run in the context of the WUI thread\n", filename, lineno);
+ abort ();
+ }
+}
+
+void
+assert_is_main_thread (const char *filename, int lineno)
+{
+ if (g_thread_self () != main_gthread) {
+ fprintf (stderr, "%s:%d: internal error: this function should only run in the context of the main thread\n", filename, lineno);
+ abort ();
+ }
+}
+