public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Java Patch List <java-patches@gcc.gnu.org>
Subject: [RFA] Boehm GC support addition for debugging
Date: Mon, 19 Jun 2006 16:23:00 -0000	[thread overview]
Message-ID: <4496CF73.7000507@redhat.com> (raw)

[-- 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
+}

             reply	other threads:[~2006-06-19 16:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-19 16:23 Keith Seitz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4496CF73.7000507@redhat.com \
    --to=keiths@redhat.com \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).