[RFA] _Jv_ThreadGetData?

Keith Seitz keiths@redhat.com
Fri Jul 21 14:50:00 GMT 2006


Hi,

This patch would add a little helper function to java.lang.Thread to 
allow external access to the _Jv_Thread_t contained in the Thread's 
native data. This is needed to implement JVMTI and JDWP thread suspension.

As an alternative to making this data public, I could add another 
wrapper for _Jv_SuspendThread and _Jv_ResumeThread (which wrap GC thread 
suspension functions) to natThread.cc, but that seems like it might be 
more confusing than not. In order to keep it cleaner, I would probably 
rename _Jv_{Suspend,Resume}Thread to _Jv_{Suspend,Resume}GCThread and 
reserve _Jv_{Suspend,Resume}Thread (Thread*) for natThread.cc

I don't know if _Jv_ThreadGetData would be useful for any other purpose.

Anyone have a preference?
Keith

ChangeLog
2006-07-21  Keith Seitz  <keiths@redhat.com>

         * java/lang/natThread.cc (_Jv_ThreadGetData): New function.
         * Makefile.am (java/lang/Thread.h): Add friend function
         _Jv_ThreadGetData.
         * Makefile.in: Regenerate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: threadgetdata.patch
Type: text/x-patch
Size: 1932 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20060721/87e24706/attachment.bin>


More information about the Java-patches mailing list