PATCH: Threads and SIGINT

Tom Tromey
Thu Dec 23 11:35:00 GMT 1999

Bryce> Here's a new patch for threads and SIGINT handling. This is a
Bryce> somewhat refined version of the threads patch that I have
Bryce> previously posted.

I read this.

Parts of it are ok: fixing the interrupted/isInterrupted semantics
(this part is better than ok: it is required), the Boehm GC changes,
the bug fix in Thread.join.

Parts I like less.  I don't like that the LINUX_THREADS define is used
outside the posix-threads code.  I think this imlementation detail
should be kept entirely private to the posix threads code.

There has to be some other way to do this.  For instance, on non-Linux
POSIX systems, we could record the condition variable when
_Jv_CondWait is entered, and have _Jv_ThreadInterrupt notify this
condition variable.  Wouldn't that work?  What do you think of this?

Bryce> In order to fix this I think we need to force the use of
Bryce> default, non-recursive mutexes on Solaris. I think this could
Bryce> be done with something like "#if defined (SOLARIS &&
Bryce> at the top of posix-threads.h, but perhaps there is a better
Bryce> way.

I'd rather not use platform defines like "SOLARIS".  I realize we do
that for Linux, but that was a mistake.  Instead we could have a
define that would be used to disable HAVE_RECURSIVE_MUTEX, and define
this define in when using Solaris.

I agree we should try to get this in soon.  Lately I've come to have a
full appreciation for how much it sucks to have patches languish.


More information about the Java-patches mailing list