Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libgc
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2006-05-19 11:37:19 +0400
committerMartin Baulig <martin@novell.com>2006-05-19 11:37:19 +0400
commit6820792214c23a651f5e5ff1dd57b43b4a2bb940 (patch)
tree15a4080bece828c60125cddc4d942e0063c0f061 /libgc
parenta31fef4f09f09434d96f0a133b58b395d618e784 (diff)
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. svn path=/trunk/mono/; revision=60857
Diffstat (limited to 'libgc')
-rw-r--r--libgc/ChangeLog6
-rw-r--r--libgc/include/gc.h3
-rw-r--r--libgc/include/libgc-mono-debugger.h6
-rw-r--r--libgc/pthread_stop_world.c20
-rw-r--r--libgc/pthread_support.c10
5 files changed, 30 insertions, 15 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog
index bb4a09b2c31..42ad1ca0b8f 100644
--- a/libgc/ChangeLog
+++ b/libgc/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/libgc/include/gc.h b/libgc/include/gc.h
index ae7b8d0632f..f7f3f01d779 100644
--- a/libgc/include/gc.h
+++ b/libgc/include/gc.h
@@ -899,9 +899,6 @@ GC_API void (*GC_is_visible_print_proc)
#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. */
diff --git a/libgc/include/libgc-mono-debugger.h b/libgc/include/libgc-mono-debugger.h
index f577a5045a8..d1606d7cfda 100644
--- a/libgc/include/libgc-mono-debugger.h
+++ b/libgc/include/libgc-mono-debugger.h
@@ -1,9 +1,7 @@
#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
{
@@ -27,5 +25,3 @@ GC_mono_debugger_add_all_threads (void);
#endif
-#endif
-
diff --git a/libgc/pthread_stop_world.c b/libgc/pthread_stop_world.c
index 6c0ca18ec6f..39e8d5d8eff 100644
--- a/libgc/pthread_stop_world.c
+++ b/libgc/pthread_stop_world.c
@@ -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 @@ void GC_stop_world()
/* 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 @@ static void pthread_start_world()
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 @@ static void pthread_stop_init() {
/* 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 @@ void GC_stop_init()
pthread_stop_init ();
}
-#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+#ifdef MONO_DEBUGGER_SUPPORTED
GCThreadFunctions *gc_thread_vtable = NULL;
diff --git a/libgc/pthread_support.c b/libgc/pthread_support.c
index 92878c87c2a..ecb07ffd4e2 100644
--- a/libgc/pthread_support.c
+++ b/libgc/pthread_support.c
@@ -191,6 +191,10 @@ static __thread MONO_TLS_FAST void* GC_thread_tls;
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 @@ void GC_delete_thread(pthread_t id)
} 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 @@ void GC_thr_init()
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 @@ void * GC_start_routine_head(void * arg, void *base_addr,
/* 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