This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin 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: Probably unnecessary InterlockedCompareExchangePointer in List_remove in thread.h


On Mon, May 30, 2005 at 08:00:52PM +0200, Vaclav Haisman wrote:
>I am not sure, that is why I wrote "probably". But from what I see there is
>already exclusive access guaranteed by the mx.lock() call, unless of course I
>am completely misunderstanding something.

I don't think you are.  I missed this too when I saw your patch and had
the same reaction that Corinna did.

I think this patch should be ok to apply.

>I can tell you that "lock; cmpxchg" pair of instruction is really not as cheap
>as it looks. Especially on SMP systems. It takes above 100 of cycles on
>contemporary CPUs.

Do you have a reference which states this?  100s of cycles sounds like an
incredible amount of overhead.

cgf


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