Subj : Re: CMPXCHG timing To : comp.programming.threads From : David Hopwood Date : Fri Apr 01 2005 09:49 pm Michael Pryhodko wrote: > [implementation with problem skipped] > > So far it looks like speaking to myself. :) Well, it seems I found why > proposed code does not work. It seems that internal implementation of > CMPXCHG does not conform microcode listed in Intel Architecture manual, > i.e.: > processor reads value from memory, compares it with EAX and if they are > different processor WRITES BACK original value!! What microcode? The Intel arch manuals have some pseudocode listings, but no microcode AFAICS. The pseudocode says nothing about timing, and cycle counts should be taken as approximations. -- David Hopwood .