2006-05-17 Martin Baulig <martin@ximian.com>
Fix a weird race condition which prevented XSP from working inside
the debugger - see doc/debugger-issues.txt for details.
* include/gc.h: Moved the "libgc-mono-debugger.h" #include down
after the gc_pthread_redirects.h one.
* include/libgc-mono-debugger.h
(GCThreadFunctions): Added `thread_created' and `thread_exited'.
(GC_mono_debugger_add_all_threads): New function prototype.
* pthread_stop_world.c (gc_thread_vtable): Allow the vtable and
any function in it be NULL; use NULL as the default vtable.
(GC_mono_debugger_add_all_threads): New public function.
* pthread_support.c (GC_new_thread): Use calloc() instead of
GC_INTERNAL_MALLOC() to allocate the `GC_thread' structure.
(GC_delete_thread): Call `gc_thread_vtable->thread_exited()'.
(GC_thr_init): Call `gc_thread_vtable->thread_created()'.
(GC_start_routine_head): Likewise; use calloc() instead of
GC_INTERNAL_MALLOC() to allocate the `start_info'.
svn path=/trunk/mono/; revision=60766