ARM Technical Support Knowledge Articles

What is the advantage of using the LDREX,STREX ARM V6 instructions for semaphore operations over a SWP ?

Applies to: ARM1136, ARM1156, ARM1176

Answer

Though the SWP instruction will still work with ARM V6 cores, it is recommended to use the new V6 synchronization instructions. The SWP instruction produces ‘locked’ read and write accesses which are atomic, i.e. another operation cannot be done between these locked accesses which ties up external bus (AHB,AXI) bandwidth and can increase worst case interrupt latencies. LDREX,STREX are more flexible, other instructions can be done between the LDREX and STREX accesses. 

See also:

Article last edited on: 2008-09-09 15:47:51

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential