Thread suspension w/JDWP

Keith Seitz keiths@redhat.com
Thu Sep 15 22:41:00 GMT 2005


Hi,

So, it's time to discuss some issues implementing the VM interface for 
GCJ. To start, I'd like to address thread suspension.

Now, I know I'm going to get people in a tizzie, but I've implemented 
something for JDWP completely orthogonal to whatever GCJ already includes.

Maybe this is okay, since Thread.suspend is not currently implemented 
and Thread.suspend is deprecated.

Anyway, thread suspension as I've currently implemented it is achieved 
using signals and a semaphore. When it is time to suspend a thread, it 
is signalled and receiving thread then spins on the semaphore until some 
other thread increments it.

So the real question/s I have is/are: What signal to use to accomplish 
this? From the comments in posix-threads.cc, I see that the usual 
suspects are already being used by other parts of the system.

Another interesting question (one which I cannot answer in a timely 
fashion) involves the possibility of re-using the GC's signal. If there 
is anyone out there that is familiar with the GC, I would be interested 
in hearing from you on this topic.

Keith



More information about the Java mailing list