Sure, I know what it means. I've been using them since around 1992. :)
I don't think it's appropriate to call them "lock free", nor to say they "won't block other threads". Neither statement is true. The LOCK modifier halts the other CPU(s) on multiprocessor boxes while the instruction is executed. If that CPU is running another thread, then it's blocked. Now, the amount of time that it's blocked is very small (the space of a single instruction). Calling it a "lightweight lock" is appropriate. Calling it "lock free" is not. On 4/14/07, Barry Kelly <[EMAIL PROTECTED]> wrote:
Brad Wilson <[EMAIL PROTECTED]> wrote: > I don't mean to pick what might seem like a nit, but how is InterlockedXxx > not a lock? 'Interlocked' refers to asserting control on the CPU-memory bus, IIRC. In particular, the prefix is 'LOCK' in the x86 CPU. They're not like 'lock' in e.g. C#, because they don't cause other threads to block. -- Barry
=================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com