* include/gc.h: Don't include "libgc-mono-debugger.h".
* pthread_support.c, pthread_stop_world.c: Include it here.
svn path=/trunk/mono/; revision=60857
+2006-05-19 Martin Baulig <martin@ximian.com>
+
+ * include/gc.h: Don't include "libgc-mono-debugger.h".
+
+ * pthread_support.c, pthread_stop_world.c: Include it here.
+
2006-05-17 Martin Baulig <martin@ximian.com>
* pthread-support.c, pthread-stop-world.c: Put the debugger stuff
#endif
#endif
-#define _IN_LIBGC_GC_H
-#include "libgc-mono-debugger.h"
-
# if defined(PCR) || defined(GC_SOLARIS_THREADS) || \
defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
/* Any flavor of threads except SRC_M3. */
#ifndef LIBGC_MONO_DEBUGGER_H
#define LIBGC_MONO_DEBUGGER_H
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
-
-#if defined(_IN_LIBGC_GC_H) || defined(_IN_THE_MONO_DEBUGGER)
+#if defined(_IN_LIBGC) || defined(_IN_THE_MONO_DEBUGGER)
typedef struct
{
#endif
-#endif
-
#include <errno.h>
#include <unistd.h>
+/* work around a dlopen issue (bug #75390), undefs to avoid warnings with redefinitions */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+#include "mono/utils/mono-compiler.h"
+
+#ifdef MONO_DEBUGGER_SUPPORTED
+#include "include/libgc-mono-debugger.h"
+#endif
+
#if DEBUG_THREADS
#ifndef NSIG
/* We should have previously waited for it to become zero. */
# endif /* PARALLEL_MARK */
++GC_stop_count;
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->stop_world)
gc_thread_vtable->stop_world ();
else
void GC_start_world()
{
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->start_world)
gc_thread_vtable->start_world();
else
/* We hold the allocation lock. */
void GC_stop_init()
{
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->initialize)
gc_thread_vtable->initialize ();
else
pthread_stop_init ();
}
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
GCThreadFunctions *gc_thread_vtable = NULL;
static GC_bool keys_initialized;
+#ifdef MONO_DEBUGGER_SUPPORTED
+#include "include/libgc-mono-debugger.h"
+#endif
+
/* Recover the contents of the freelist array fl into the global one gfl.*/
/* Note that the indexing scheme differs, in that gfl has finer size */
/* resolution, even if not all entries are used. */
} else {
prev -> next = p -> next;
}
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->thread_exited)
gc_thread_vtable->thread_exited (id, &p->stop_info.stack_ptr);
#endif
t -> stop_info.stack_ptr = (ptr_t)(&dummy);
# endif
t -> flags = DETACHED | MAIN_THREAD;
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->thread_created)
gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr);
#endif
/* This is also < 100% convincing. We should also read this */
/* from /proc, but the hook to do so isn't there yet. */
# endif /* IA64 */
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->thread_created)
gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
#endif