This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
RE: Patch for Review: PR/9254 and other Win32 Threading Fixes
- From: "Ranjit Mathew" <rmathew at hotmail dot com>
- To: hans_boehm at hp dot com
- Cc: adam at megacz dot com, java-patches at gcc dot gnu dot org
- Date: Tue, 28 Jan 2003 18:43:14 +0530
- Subject: RE: Patch for Review: PR/9254 and other Win32 Threading Fixes
- Bcc:
Doesn't this reset the owner field to zero even for a nested
_Jv_MutexUnlock call? I suspect you need a count field to correctly
maintain the owner field, unless you can somehow get at the one that's
already inside the CriticalSection.
Your observation about the potential bug is correct.
Sorry! (And Tom would also chide me for not including a
"Fixes PR java/9254" in the ChangeLog - Sorry again!)
I do not know of a way of getting at the ownership
info inside a CriticalSection and I strongly suspect
that there isn't any, because the API documentation
for LeaveCriticalSection( ) should not then say:
"[...]If a thread calls LeaveCriticalSection when it does not have ownership
of the specified critical section object, an error occurs that may cause
another thread using EnterCriticalSection to wait indefinitely."
(http://msdn.microsoft.com/library/en-us/dllproc/base/leavecriticalsection.asp)
I will resubmit this patch soon with the above bugs fixed.
Ranjit.
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963