Author: martin
Date: 2006-05-19 03:37:19 -0400 (Fri, 19 May 2006)
New Revision: 60857
Modified:
trunk/mono/libgc/ChangeLog
trunk/mono/libgc/include/gc.h
trunk/mono/libgc/include/libgc-mono-debugger.h
trunk/mono/libgc/pthread_stop_world.c
trunk/mono/libgc/pthread_support.c
Log:
2006-05-19 Martin Baulig <[EMAIL PROTECTED]>
* include/gc.h: Don't include "libgc-mono-debugger.h".
* pthread_support.c, pthread_stop_world.c: Include it here.
Modified: trunk/mono/libgc/ChangeLog
===================================================================
--- trunk/mono/libgc/ChangeLog 2006-05-19 04:12:29 UTC (rev 60856)
+++ trunk/mono/libgc/ChangeLog 2006-05-19 07:37:19 UTC (rev 60857)
@@ -1,3 +1,9 @@
+2006-05-19 Martin Baulig <[EMAIL PROTECTED]>
+
+ * 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 <[EMAIL PROTECTED]>
* pthread-support.c, pthread-stop-world.c: Put the debugger stuff
Modified: trunk/mono/libgc/include/gc.h
===================================================================
--- trunk/mono/libgc/include/gc.h 2006-05-19 04:12:29 UTC (rev 60856)
+++ trunk/mono/libgc/include/gc.h 2006-05-19 07:37:19 UTC (rev 60857)
@@ -899,9 +899,6 @@
#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. */
Modified: trunk/mono/libgc/include/libgc-mono-debugger.h
===================================================================
--- trunk/mono/libgc/include/libgc-mono-debugger.h 2006-05-19 04:12:29 UTC
(rev 60856)
+++ trunk/mono/libgc/include/libgc-mono-debugger.h 2006-05-19 07:37:19 UTC
(rev 60857)
@@ -1,10 +1,8 @@
#ifndef LIBGC_MONO_DEBUGGER_H
#define LIBGC_MONO_DEBUGGER_H
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#if defined(_IN_LIBGC) || defined(_IN_THE_MONO_DEBUGGER)
-#if defined(_IN_LIBGC_GC_H) || defined(_IN_THE_MONO_DEBUGGER)
-
typedef struct
{
void (* initialize) (void);
@@ -27,5 +25,3 @@
#endif
-#endif
-
Modified: trunk/mono/libgc/pthread_stop_world.c
===================================================================
--- trunk/mono/libgc/pthread_stop_world.c 2006-05-19 04:12:29 UTC (rev
60856)
+++ trunk/mono/libgc/pthread_stop_world.c 2006-05-19 07:37:19 UTC (rev
60857)
@@ -9,6 +9,18 @@
#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
@@ -412,7 +424,7 @@
/* 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
@@ -483,7 +495,7 @@
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
@@ -537,7 +549,7 @@
/* 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
@@ -545,7 +557,7 @@
pthread_stop_init ();
}
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
GCThreadFunctions *gc_thread_vtable = NULL;
Modified: trunk/mono/libgc/pthread_support.c
===================================================================
--- trunk/mono/libgc/pthread_support.c 2006-05-19 04:12:29 UTC (rev 60856)
+++ trunk/mono/libgc/pthread_support.c 2006-05-19 07:37:19 UTC (rev 60857)
@@ -191,6 +191,10 @@
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. */
@@ -691,7 +695,7 @@
} 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
@@ -972,7 +976,7 @@
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
@@ -1281,7 +1285,7 @@
/* 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
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches