Can be used to implement atomic variables, see also:
atomic.cpp
https://stackoverflow.com/questions/56810/how-do-i-start-threads-in-plain-c/52453291#52453291
The ARMv7 analogues are LDREX and STREX.