Цитата(KRS @ Jan 2 2009, 15:36)

а какая атомарная операция вам нужна?
у кортекса есть еще LDREX STREX (их можно и прямо из С использовать) и прерывания запрещать не понадобится
только толку от этих инстуркций мало
Cortex-M3 Device Generic User Guide:
Цитата
The result of executing a Store-Exclusive instruction to an address that is different from that used in the preceding Load-Exclusive instruction is unpredictable.
ARM®v7-M ArchitectureReference Manual
Цитата
If the local monitor is in its Exclusive Access state and a processor performs a Store-Exclusive to any address other than the last one from which it has performed a Load-Exclusive, it is IMPLEMENTATION DEFINED whether the store succeeds, but in all cases the local monitor is reset to its Open Access state. In ARMv7-M, the store must be treated as a software programming error.