WIN-06.1: win32-threads.cc
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Thu Jan 31 18:24:00 GMT 2002
Adam Megacz wrote:
>2002-01-31 Adam Megacz
>
> * win32-threads.cc:
> - (_Jv_CondWait, _Jv_CondNotify, _Jv_CondNotifyAll) Corrected
> wait() algorithm to make it safe.
> - (ensure_condvar_initialized, _Jv_CondInit, _Jv_CondDestroy)
> Added lazy creation of Win32 Events for better performance
> - (really_start) This now uses GC_CreateThread so boehm-gc
> knows about new threads even when statically linked.
>
Note quite formatted correctly - you should drop the "-"s and put colons
after the method lists.
>! inline void ensure_condvar_initialized(_Jv_ConditionVariable_t *cv) {
>! if (cv->ev[0] == 0) {
>
Formatting. Should have return type and modifiers on a different line,
and "{"s on new line.
eg
inline void
ensure_condvar_initialized(...
{
...
>! int _Jv_CondWait(_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu, jlong millis, jint nanos) {
>
....
>!
>! EnterCriticalSection(&cv->count_mutex);
>! cv->blocked_count--;
>! // if we were unblocked by the second event (the broadcast one) and nobody is left, reset the signal
>
You need to wrap long lines here, and comments should be full sentences.
The patch is approved, subject to formatting fixes.
regards
Bryce.
More information about the Java-patches
mailing list