This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: WIN-03: fix win32-threads.h
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Adam Megacz <patches at lists dot megacz dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Fri, 01 Feb 2002 13:53:34 +1300
- Subject: Re: WIN-03: fix win32-threads.h
- References: <86elk659wl.fsf@megacz.com>
Adam Megacz wrote:
>2002-01-31 Adam Megacz <adam@xwt.org>
>
> * include/win32-threads.h:
> - use CRITICAL_SECTIONs instead of CreateMutex()
> - more sophisticated _Jv_ConditionVariable_t to enable safer wait() algorithm
> - temporarily disabled _Jv_ThreadYield() due to crashes on win98
>
A few notes about ChangeLog entries:
- They should always specify the names of changed/added/removed
functions unless that is inapplicable or impracticle.
- They should always read as full sentences (ie capital letter at start
and "." at end)
So for this patch the changelog should look something like:
2002-01-31 Adam Megacz <adam@xwt.org>
* include/win32-threads.h (_Jv_ConditionVariable_t): Now a struct, to
enable safer wait() algorithm.
(_Jv_CondWait, _Jv_CondInit, _Jv_CondDestroy, _Jv_CondNotify,
_Jv_CondNotifyAll): Implementations moved to win32-threads.cc.
(_Jv_MutexInit, _Jv_HaveMutexDestroy, _Jv_MutexUnlock,
_Jv_MutexLock, _Jv_ThreadYield): Reimplement using CRITICAL_SECTIONs
instead of mutex.
(_Jv_ThreadYield): Don't call Sleep(), because it crashes win98.
>--- 18,31 ----
> // Typedefs.
> //
>
>! typedef struct _Jv_ConditionVariable_t {
>! HANDLE ev[2];
>! CRITICAL_SECTION count_mutex;
>! int blocked_count;
>! };
>
Please stick to GNU-style formatting. In particular, the opening block
brace "{" should always be on a new line.
This patch is approved pending these changes - have you got CVS access
arranged?
regards
Bryce.