Add assertions about which thread we are running in.
[ovirt-viewer.git] / internal.h
index 2fbf2c7..77b3907 100644 (file)
@@ -61,6 +61,12 @@ extern gboolean check_cert;
 extern void start_wui_thread (void);
 extern void stop_wui_thread (void);
 
+extern void assert_is_main_thread (const char *, int);
+extern void assert_is_wui_thread (const char *, int);
+
+#define ASSERT_IS_MAIN_THREAD() assert_is_main_thread(__FILE__,__LINE__)
+#define ASSERT_IS_WUI_THREAD() assert_is_wui_thread(__FILE__,__LINE__)
+
 /* These are messages (instructions) which can be sent from the main
  * thread to the WUI thread.
  */