Re: CAS (lws_compare_and_swap32)
On Tue, Mar 30, 2010 at 04:38:08PM -0400, Carlos O'Donell wrote:
> * Thread A enters LWS CAS (no lock on UP)
> * Thread A writes to CAS address causing COW
> * Thread A sleeps.
> * Thread A completes COW, but finishes time slice before the write is restarted.
> * Thread B enters LWS CAS (no lock on UP)
> * Thread B writes to CAS address, and finishes time slice.
> * Thread A writes to CAS address and clobbers B's value.
>
> The solution is to add the locks to the UP case to avoid this problem.
>
Yes, removing the CONFIG_SMP on that bit looks like it will solve the
problem.
regards, Kyle
Reply to: