]> granicus.if.org Git - gc/commitdiff
2006-05-17 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Wed, 17 May 2006 18:59:53 +0000 (18:59 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:28:02 +0000 (15:28 +0400)
* pthread-support.c, pthread-stop-world.c: Put the debugger stuff
inside a `#if LIBGC_MONO_DEBUGGER_SUPPORTED' conditional.

svn path=/trunk/mono/; revision=60799

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

index a4fefc55af8193dc72a265e80a4d796b1529ef6c..fc5b46cdc01c8950d257c6b57012b3b359b1773b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-17  Martin Baulig  <martin@ximian.com>
+
+       * pthread-support.c, pthread-stop-world.c: Put the debugger stuff
+       inside a `#if LIBGC_MONO_DEBUGGER_SUPPORTED' conditional.
+
 2006-05-17  Martin Baulig  <martin@ximian.com>
 
        Fix a weird race condition which prevented XSP from working inside
index ffeefd7a30a2e7a9ad6ba130a2bb77f1e96d1bb5..f577a5045a8378842bec8e7ed2e9afc1c89fd2b8 100644 (file)
@@ -1,6 +1,8 @@
 #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)
 
 typedef struct
@@ -25,3 +27,5 @@ GC_mono_debugger_add_all_threads (void);
 
 #endif
 
+#endif
+
index 6291d47fb2d8c2f52906b1257abdfd4057667295..6c0ca18ec6f7f3bab02823c4e51d890d5b85f37f 100644 (file)
@@ -412,9 +412,11 @@ 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
     if (gc_thread_vtable && gc_thread_vtable->stop_world)
        gc_thread_vtable->stop_world ();
     else
+#endif
        pthread_stop_world ();
 #   ifdef PARALLEL_MARK
       GC_release_mark_lock();
@@ -481,9 +483,11 @@ static void pthread_start_world()
 
 void GC_start_world()
 {
+#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
     if (gc_thread_vtable && gc_thread_vtable->start_world)
        gc_thread_vtable->start_world();
     else
+#endif
        pthread_start_world ();
 }
 
@@ -533,12 +537,16 @@ static void pthread_stop_init() {
 /* We hold the allocation lock.        */
 void GC_stop_init()
 {
+#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
     if (gc_thread_vtable && gc_thread_vtable->initialize)
        gc_thread_vtable->initialize ();
     else
+#endif
        pthread_stop_init ();
 }
 
+#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
+
 GCThreadFunctions *gc_thread_vtable = NULL;
 
 void
@@ -556,5 +564,6 @@ GC_mono_debugger_add_all_threads (void)
     }
 }
 
+#endif
 
 #endif
index d3e387c4ad42357d5443df023f9468e5e8ad4367..4bad60f7a4ac10b38b43a0a5cf41597beaafa4a7 100644 (file)
@@ -650,8 +650,10 @@ void GC_delete_thread(pthread_t id)
     } else {
         prev -> next = p -> next;
     }
+#ifdef LIBGC_MONO_DEBUGGER_SUPPORTED
     if (gc_thread_vtable && gc_thread_vtable->thread_exited)
        gc_thread_vtable->thread_exited (id, &p->stop_info.stack_ptr);
+#endif
     free(p);
 }
 
@@ -929,8 +931,10 @@ void GC_thr_init()
          t -> stop_info.stack_ptr = (ptr_t)(&dummy);
 #     endif
       t -> flags = DETACHED | MAIN_THREAD;
+#ifdef LIBGC_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
 
     GC_stop_init();
 
@@ -1236,8 +1240,10 @@ 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
     if (gc_thread_vtable && gc_thread_vtable->thread_created)
        gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
+#endif
     UNLOCK();
 
     if (start) *start = si -> start_routine;