This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Thread suspension w/JDWP


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]