[ros-dev] Re: [ros-svn] [hbirr] 14000: Use only one access to
the spinlock in the assertion,
because the value may change between two access' on smp machines.
Thomas Weidenmueller
w3seek at reactos.com
Sun Mar 13 15:29:57 CET 2005
Hartmut Birr wrote:
>Thomas Weidenmueller schrieb:
>
>
>I must change this because my smp machine does crash in the early boot
>phase at this point. If someone releases the spinlock between the two
>comparisons the assertion gets a hit.
>
>- Hartmut
>
>
>
Hm, but wouldn't you then rather have to assert the previous value that
InterlockedExchange returned? This way the value would've been read
atomically only once instead of twice as it is at the moment.
Best Regards,
Thomas
More information about the Ros-dev
mailing list