__strexd intrinsic lets you use an
STREXD instruction in your C or C++ code to perform an exclusive doubleword data store to memory.
LDREXDinstruction generated for the
__ldrexdintrinsic and the
STREXDinstruction generated for the
__strexdintrinsic. Because memory accesses can clear the exclusive monitor, code using the
__strexdintrinsics can have unexpected behavior. Where
STREXDinstructions are needed, ARM recommends using embedded assembly.
int __strexd(unsigned long long
val, volatile void
is the value to be written to memory.
points to the address of the data to be written to in memory. To specify the size of the data to be written, cast the parameter to an appropriate integral type.
Table 10-12 Access widths that the __strexd intrinsic supports
Instruction Size of data stored Pointer type
long long *
__strexd intrinsic returns:
STREXDinstruction is locked out.
The compiler does not recognize the
__strexd intrinsic when compiling for a
target that does not support the
STREXD instruction. The compiler generates
either a warning or an error in this case, depending on the source language:
- In C code:
Warning: #223-D: function "__strexd" declared implicitly.
- In C++ code:
Error: #20: identifier "__strexd" is undefined.
__strexd intrinsic only supports access to doubleword data. The
compiler generates an error if you specify an access width that is not supported.