Patch for Review: PR/9254 and other Win32 Threading Fixes
Ranjit Mathew
rmathew@hotmail.com
Tue Jan 28 13:13:00 GMT 2003
>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
More information about the Java-patches
mailing list