This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: PATCH: Threads and SIGINT
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: PATCH: Threads and SIGINT
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Thu, 23 Dec 1999 11:35:23 -0800 (PST)
- Cc: java-patches at sourceware dot cygnus dot com, Joerg Brunsmann <joerg dot brunsmann at FernUni-Hagen dot de>
- References: <3861C24E.D1C0428C@albatross.co.nz>
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> HAVE_PTHREAD_MUTEX_SETTYPE) #undef HAVE_PTHREAD_MUTEX_SETTYPE"
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 configure.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.
Tom