]> granicus.if.org Git - gc/commitdiff
2006-05-19 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Fri, 19 May 2006 07:37:19 +0000 (07:37 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:28:02 +0000 (15:28 +0400)
* 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

ChangeLog
include/gc.h
include/libgc-mono-debugger.h
pthread_stop_world.c
pthread_support.c

index fc5b46cdc01c8950d257c6b57012b3b359b1773b..b960718dadc2278e7385e7ddabb68bfd3b70bfc8 100644 (file)
--- a/ChangeLog
+++ b/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
index ae7b8d0632f8207a4cfe3a64b5bd85e4e206f734..f7f3f01d77996a3efafb70763ecadf20c24963a1 100644 (file)
@@ -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. */
index f577a5045a8378842bec8e7ed2e9afc1c89fd2b8..d1606d7cfda714d8ce328dbc70ae47962d22a300 100644 (file)
@@ -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
-
index 6c0ca18ec6f7f3bab02823c4e51d890d5b85f37f..39e8d5d8eff33bca7037472344e25f8020c55ac7 100644 (file)
@@ -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;
 
index 4bad60f7a4ac10b38b43a0a5cf41597beaafa4a7..d0b004c56f392e3eef119fd124b7e57f3e2a6837 100644 (file)
@@ -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.                       */
@@ -650,7 +654,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
@@ -931,7 +935,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
@@ -1240,7 +1244,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