This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for Review: PR/9254 and other Win32 Threading Fixes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]