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


Mohan Embar writes:
 > > > ...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.

That would be interesting.  If it works, feel free to commit.

Andrew.


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