gcj crashes if a user-thread gives up its rights

Jost Boekemeier jost2345@yahoo.de
Tue Dec 14 10:50:00 GMT 2004


On Mon, 2004年12月13日 at 18:17, Bryce McKinlay wrote:
>> It would be interesting to know how these other VMs solved the issue. 

Mediator pattern. The mediator still runs with the appropriate
privileges. I guess GCJ already has a mediator which iterates through
the list of threads and stops each of them when the user-thread's GC
wants to run. The only thing that seems to fail is the command that the
user-thread's GC sends to the mediator.
> Is there is another IPC mechanism with the necessary semantics - ie able 
> to suspend any thread at any time, asynchronously? 

I think this should not be necessary. The mediator waits for commands
anyway, so a simple pipe would be sufficient. Even a condition variable
will work. So we only have to change the pthread_kill() into a
pthread_cond_signal() and the mediator's sigwait() into a
pthread_cond_wait(). -- At least in theory, if the code is written the
way I think it is written and if I understand the issue correctly :). I
still haven't looked at the code, yet.
Jost


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /