libgcj and the NPTL posix threads implementation

Tom Tromey tromey@redhat.com
Fri Feb 27 18:13:00 GMT 2004


>>>>> "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


More information about the Java mailing list

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