2005-12-23 Dick Porter <dick@ximian.com>
[mono.git] / mono / metadata / threads.h
index c54b6330594c9a5f730042b7e06a28d1afca8505..71fdc453acc19050efa9137260b1dfec64b7bbdd 100644 (file)
@@ -14,6 +14,8 @@
 #include <mono/metadata/object.h>
 #include <mono/metadata/appdomain.h>
 
+G_BEGIN_DECLS
+
 typedef void (*MonoThreadCleanupFunc) (MonoThread* thread);
 
 extern int  mono_thread_get_abort_signal (void);
@@ -22,32 +24,39 @@ extern void mono_thread_init (MonoThreadStartCB start_cb,
                              MonoThreadAttachCB attach_cb);
 extern void mono_thread_manage(void);
 extern void mono_thread_abort_all_other_threads (void);
+extern void mono_thread_suspend_all_other_threads (void);
 
 extern void mono_thread_push_appdomain_ref (MonoDomain *domain);
 extern void mono_thread_pop_appdomain_ref (void);
+extern gboolean mono_thread_has_appdomain_ref (MonoThread *thread, MonoDomain *domain);
 
 extern MonoException * mono_thread_get_pending_exception (void);
 
 extern gboolean mono_threads_abort_appdomain_threads (MonoDomain *domain, int timeout);
+extern void mono_threads_clear_cached_culture (MonoDomain *domain);
 
 extern MonoThread *mono_thread_current (void);
 
+extern void        mono_thread_set_main (MonoThread *thread);
+extern MonoThread *mono_thread_get_main (void);
+
 extern void mono_thread_stop (MonoThread *thread);
 
 typedef struct {
        gpointer (* thread_start_compile_func) (MonoMethod *delegate);
-       void (* thread_created) (guint32 tid, gpointer stack_start, gpointer func);
-       void (* start_resume) (guint32 tid);
-       void (* end_resume) (guint32 tid);
+       void (* thread_created) (gsize tid, gpointer stack_start, gpointer func);
+       void (* start_resume) (gsize tid);
+       void (* end_resume) (gsize tid);
 } MonoThreadCallbacks;
 
 extern void mono_install_thread_callbacks (MonoThreadCallbacks *callbacks);
 
-extern void mono_thread_new_init (guint32 tid, gpointer stack_start,
+extern void mono_thread_new_init (gsize tid, gpointer stack_start,
                                  gpointer func);
 extern void mono_thread_create (MonoDomain *domain, gpointer func, gpointer arg);
 extern MonoThread *mono_thread_attach (MonoDomain *domain);
 extern void mono_thread_detach (MonoThread *thread);
+extern void mono_thread_exit (void);
 
 void     mono_threads_install_cleanup   (MonoThreadCleanupFunc func);
 
@@ -63,6 +72,9 @@ void mono_gc_start_world (void);
 extern MonoException* mono_thread_request_interruption (gboolean running_managed);
 extern gboolean mono_thread_interruption_requested (void);
 extern void mono_thread_interruption_checkpoint (void);
+extern void mono_thread_force_interruption_checkpoint (void);
 extern gint32* mono_thread_interruption_request_flag (void);
 
+G_END_DECLS
+
 #endif /* _MONO_METADATA_THREADS_H_ */