This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: libgcj and the NPTL posix threads implementation
- From: Tom Tromey <tromey at redhat dot com>
- To: Anthony Green <green at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: 27 Feb 2004 11:01:56 -0700
- Subject: Re: libgcj and the NPTL posix threads implementation
- References: <1077896348.3462.415.camel@escape>
- Reply-to: tromey at redhat dot com
>>>>> "Anthony" == Anthony Green <green@redhat.com> writes:
Anthony> It looks like NPTL contains a working version of recursive
Anthony> mutexes.
The reason we have our own is that glibc's condition variables didn't
used to work with recursive mutexes. And if you have to implement
your own condition variables that do, then you must also implement
your own recursive mutexes. See this thread:
http://sources.redhat.com/ml/bug-glibc/2000-03/msg00054.html
Do you know if this situation has changed?
Anthony> The one catch is _Jv_MutexCheckMonitor(_Jv_Mutex_t *), which
Anthony> is a sanity checker and wants to look at the mutex owner. Is
Anthony> it safe to ignore this?
I'm not sure. Perhaps it is needed for runtime safety. Otherwise
can't a malicious bit of bytecode try to unlock locks held by some
other thread? Maybe the glibc functions do all the error checking we
need?
Tom