The Cortex-M4 Instruction Set
ARM DUI 0553A Copyright © 2010 ARM. All rights reserved. 3-38
ID121610 Non-Confidential
3.4.9 CLREX
Clear Exclusive.
Syntax
CLREX{cond}
where:
cond
Is an optional condition code, see Conditional execution on page 3-18.
Operation
Use
CLREX
to make the next
STREX
,
STREXB
, or
STREXH
instruction write 1 to its destination register
and fail to perform the store. It is useful in exception handler code to force the failure of the store
exclusive if the exception occurs between a load exclusive instruction and the matching store
exclusive instruction in a synchronization operation.
See Synchronization primitives on page 2-18 for more information.
Condition flags
This instruction does not change the flags.
Examples
CLREX