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?


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.


> 3. A comment in the _Jv_ThreadYield( ) method says that Sleep(0)
>      freezes hard on Win98. I have a Win98 box and I have tried
>      calling Sleep(0) a zillion times in various contexts without
>      producing a crash. So I uncommented this.

Sounds fine.  I did this back before threads really worked, so it
might be fine.  If I can reproduce it I'll file a PR.



> 5. The notifyAll( ) bug reported by Erik was due to the fact that
>      ResetEvent( ) was being passed a *pointer to a handle* instead

Egads!  THANK YOU for finding this!  I had to kludge around it in XWT
because I couldn't figure out what was going on ;)



> 6. The SignalObjectAndWait( ) function is not supported on Win95
>      (and is supposed to be a dummy on Win98) and causes even a

Yes, I don't know who wrote _Jv_ThreadWait, but it should work like
_Jv_CondWait does (perhaps even call it?).

Looks mostly okay; repost one more time with -u and I'll sign off on
it.

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!

  - a


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