Re: Spinlock Clarification

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Robby Tanner (rtanner_at_lightsource.ca)
Date: 09/29/04


Date: Wed, 29 Sep 2004 10:06:55 -0600

I don't think so, although admittedly I haven't got that far yet:

from Walter's book:

"To acquire a spin lock, code on one CPU executes an atomic operation that
tests and then sets a memory variable in such a way that no other CPU can
access the variable until the operation completes."

What wasn't obvious from the sample code in the text was how I specify what
memory variable(s) to lock.

Rob

"Pavel A." <pavel_a@NOwriteme.com> wrote in message
news:OsO8vZbpEHA.592@TK2MSFTNGP11.phx.gbl...
> Robby,
>
> Probably you're confusing spinlocks with atomic-locked operations
> (InterlockedXxx...)
>
> --PA
>