[PATCH] ARM: Add PI/robust mutexes support for SMP kernels

Nicolas Pitre nico at fluxnic.net
Mon Jun 7 16:40:01 EDT 2010


On Tue, 8 Jun 2010, Anton Vorontsov wrote:

> So, can we solve this by
> 
> ldrex
> ...
> strt newval
>    ^ may cause exception, but doesn't clear the tag, so we're still atomic
> strex <- clears the tag

No, you're not atomic anymore, as some other ldrex/strex might have come 
through by the time the strt is executed, and while this strex wouldn't 
be executed as the tag would be cleared at that point, the strt has no 
such concerns with atomic tags and would indeed corrupt whatever new 
value has been stored in the mean time.



Nicolas



More information about the linux-arm-kernel mailing list