Patch for Review: PR/9254 and other Win32 Threading Fixes
Ranjit Mathew
rmathew@hotmail.com
Mon Jan 27 10:23:00 GMT 2003
>Ranjit, could you resend the diff using -u?
Ok. I'll resend it with "diff -u2" to the java-patches
list.
>Ranjit Mathew <rmathew@vsnl.net> writes:
> > 1. I have had to change _Jv_Mutex_t to a struct containing the
> > original critical section as well as a DWORD owner thread-id.
>
>Could we use TryEnterCriticalSection() to detect whether or not the
>current thread owns the mutex? This wouldn't require expanding the
>Jv_Mutex structure.
Right, so I would get to know if I'm not the owner of the critical
section if TryEnterCriticalSection( ) fails, but if it succeeds,
I'll have to use LeaveCriticalSection( ) *twice* to prevent
SNAFU-ing up (ref. MSDN). That would, IMHO, make the code a bit
weird to read.
>By the way, Ranjit, at this point it looks like you understand the
>Win32 stuff at least as well as I do; in the future, you can commit to
>Win32-specific sections (*Win32*, #ifdef WIN32) without waiting for my
>approval as long as you're not doing a major overhaul/rearchitecting.
>
>Thanks again for all that you've done!
Thanks a lot for your kind words!
Ranjit.
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
More information about the Java
mailing list