This is the mail archive of the java-patches@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: WIN-03: fix win32-threads.h


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.




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