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: Patch [ecj]: Refactor Parking Code + Win32 Implementation


> > ...why do you lock and unlock the mutex outside of the if statement
> > rather than within it?
>
>I have no idea.  Perhaps at this point my best defence would be to
>plead insanity...

I can relate. I was half-asleep last night when I realized that
the use I was making of the semaphore had exactly the same semantics
as an event. I could have done a drop-in replacement and kept my
old version (without compare_and_exchange), except that I read somewhere
that these calls are very expensive.

Thanks again for reviewing this. If you want me to put the mutex
locking and unlocking inside the if statement and rerun my test on
FC5, let me know.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/





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