We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
; void acquireLock(int* lockAddr)acquireLock LDREX r1, [r0] CMP r1, #0 ; 0 = unlocked WFENE MOVEQ r2, #1 ; 1 = locked STREXEQ r3, r2, [r0] ; r3 = 1, but the store DOES occur! CMPEQ r3, #0 BNE acquireLock DMB MOV pc, lr