FirstThread

Tom Tromey tromey@cygnus.com
Wed Oct 27 11:04:00 GMT 1999


>>>>> "Jeff" == Jeff Sturm <jsturm@sigma6.com> writes:

Jeff> I don't think the thread layer would change much.  Some
Jeff> functions may no longer be needed, like _Jv_ThreadWait.

We'll still need something.  Our (still internal) cooperative thread
system doesn't use the "main" thread.  Maybe I'm misunderstanding; I
think I'd need to see a patch, or more details.

Jeff> I've been thinking some about the interaction of threads with
Jeff> boehm-gc though... every new thread system has to be ported
Jeff> twice.  There is a linux-threads.c port in boehm-gc and a
Jeff> corresponding posix-threads.c port in libjava.  Similar for
Jeff> quick-threads.  Since everything boehm-gc needs from the thread
Jeff> system can be done easily in libgcj (at least once we have
Jeff> suspend/resume), why not just create one gcj-threads port in
Jeff> boehm-gc and have it call back into libgcj?

That would be nice, because it would let us reuse the thread code
if/when we write a new GC.

We also need a way to get the stack limits, though, which might be
hard.

And there might be nasty interactions with shared libraries (a part of
the GC which I haven't explored yet).

GC/thread/libjava interactions have never been specified.  We took a
simplistic approach at first since we knew we only had to deal with
one GC.  The current scheme was never intended to be the final one.

Tom


More information about the Java mailing list