Peter Donald
added a comment - 29/Jun/07 10:16 PM Rather than doing this as a separate task it was lumped in with the work on the RVM-91 branch. I will extract out and commit in reasonable sized chunks to main trunk.

Hi Peter, whilst doing this change looks quite simple there are a number of subtle fixes in the RVM-91 branch that enable the Classpath java.lang.Thread to work there. I'll list the ones I can remember:

Thread.suspend and Thread.resume are synchronized meaning that Thread.suspend must unlock the lock held on itself prior to suspending

this leads to problems unwinding the stack as a synchronized method should hold a lock, whereas now we need to explicitly release it

the creation of VM threads needs to be modified so that we can use Classpath's rather than our own hooks

one particular point of pain is that a java.lang.Thread is created prior to its VM_Thread. The VM_Thread is only created and started by a start happening.

another problem is with setting up the java.lang.Thread for the boot thread
Whilst lumping the work together is far from ideal I wanted to have a good stab at debugging all the changes in the RVM-91 branch together. I've already spent twice the time I'd hope to getting this code into shape.
Thank you for putting some small changes from the RVM-91 branch into the trunk. I'm not sure if doing the rest of these changes independent of RVM-91 is a good idea. In particular, it seems likely fixes to get this to work will conflict with the hopefully superior way of doing things in the RVM-91 branch.

Ian Rogers
added a comment - 30/Jun/07 9:05 AM Hi Peter, whilst doing this change looks quite simple there are a number of subtle fixes in the RVM-91 branch that enable the Classpath java.lang.Thread to work there. I'll list the ones I can remember:
Thread.suspend and Thread.resume are synchronized meaning that Thread.suspend must unlock the lock held on itself prior to suspending
this leads to problems unwinding the stack as a synchronized method should hold a lock, whereas now we need to explicitly release it
the creation of VM threads needs to be modified so that we can use Classpath's rather than our own hooks
one particular point of pain is that a java.lang.Thread is created prior to its VM_Thread. The VM_Thread is only created and started by a start happening.
another problem is with setting up the java.lang.Thread for the boot thread
Whilst lumping the work together is far from ideal I wanted to have a good stab at debugging all the changes in the RVM-91 branch together. I've already spent twice the time I'd hope to getting this code into shape.
Thank you for putting some small changes from the RVM-91 branch into the trunk. I'm not sure if doing the rest of these changes independent of RVM-91 is a good idea. In particular, it seems likely fixes to get this to work will conflict with the hopefully superior way of doing things in the RVM-91 branch.