public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFA] Boehm GC support addition for debugging
@ 2006-06-19 16:23 Keith Seitz
  2006-06-20 19:13 ` Bryce McKinlay
  0 siblings, 1 reply; 16+ messages in thread
From: Keith Seitz @ 2006-06-19 16:23 UTC (permalink / raw)
  To: Java Patch List

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

Hi,

It turns out I lied when I said I was only going to stub the 
_Jv_ThreadDebug* methods. I think I will submit them for approval, but 
first I need to add two new functions the GC interface: one to suspend 
threads and one to resume them. Is there a related doc patch that is 
required for GC interface expansions? I don't see anything. Is there 
another GC implementation in which I need to stub these methods?

I've ifdef'd out the code for this because I'm still awaiting word on 
the latest revision of my Boehm GC external thread suspension patch.

Keith

ChangeLog
2006-06-19  Keith Seitz  <keiths@redhat.com>

         * include/boehm-gc.h (_Jv_SuspendThread): Declare.
         (_Jv_ResumeThread): Declare.
         * boehm-gc.cc (_Jv_SuspnedThread): New function.
         (_Jv_ResumeThread): New function.

[-- Attachment #2: boehm-gc.patch --]
[-- Type: text/x-patch, Size: 1291 bytes --]

Index: include/boehm-gc.h
===================================================================
--- include/boehm-gc.h	(revision 114727)
+++ include/boehm-gc.h	(working copy)
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 // boehm-gc.h - Defines for Boehm collector.
 
-/* Copyright (C) 1998, 1999, 2002, 2004  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2002, 2004, 2006  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -83,4 +83,10 @@
 // _Jv_AllocBytes (jsize size) should go here, too.  But clients don't
 // usually include this header.
 
+// Suspend the given thread. This includes suspending the calling thread.
+extern "C" void _Jv_SuspendThread (pthread_t);
+
+// Resume a suspended thread.
+extern "C" void _Jv_ResumeThread (pthread_t);
+
 #endif /* __JV_BOEHM_GC__ */
Index: boehm.cc
===================================================================
--- boehm.cc	(revision 114727)
+++ boehm.cc	(working copy)
@@ -673,3 +673,21 @@
 #endif
 }
 
+void
+_Jv_SuspendThread (pthread_t thread)
+{
+#ifdef WAITING_FOR_GC_PATCH_APPROVAL
+  if (thread == pthread_self ())
+    GC_suspend_self ();
+  else
+    GC_suspend_thread (thread);
+#endif
+}
+
+void
+_Jv_ResumeThread (pthread_t thread)
+{
+#ifdef WAITING_FOR_GC_PATCH_APPROVAL
+  GC_resume_thread (thread);
+#endif
+}

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-06-27 16:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-19 16:23 [RFA] Boehm GC support addition for debugging Keith Seitz
2006-06-20 19:13 ` Bryce McKinlay
2006-06-20 19:23   ` Keith Seitz
2006-06-20 19:28     ` Bryce McKinlay
2006-06-21 20:58       ` Keith Seitz
2006-06-20 19:51   ` Keith Seitz
2006-06-21  0:05     ` Bryce McKinlay
2006-06-21 14:43       ` Keith Seitz
2006-06-21 16:28         ` Bryce McKinlay
2006-06-21 21:11   ` Keith Seitz
2006-06-26 16:01     ` Bryce McKinlay
2006-06-26 16:32       ` Keith Seitz
2006-06-27  5:01       ` Andrew Pinski
2006-06-27  5:07         ` Andrew Pinski
2006-06-27  5:20           ` Andreas Tobler
2006-06-27 16:05             ` Marco Trudel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).