[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.

Hartmut Birr hartmut.birr at gmx.de
Sun Mar 13 12:37:43 CET 2005


Thomas Weidenmueller schrieb:

> hbirr at svn.reactos.com wrote:
>
>> Use only one access to the spinlock in the assertion, because the
>> value may change between two access' on smp machines.
>>  
>>
> You implementation is better, no doubt, but it wouldn't have mattered
> to read it twice or more. I mean, it's re-read again down in the
> InterlockedExchange call, there's a possibility it might have been
> changed in the meantime as well. But it really wouldn't matter ;)
>
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


More information about the Ros-dev mailing list