Strawman Lock
lock: ld register, location /* copy location to register */
cmp location, #0 /* compare with 0 */
bnz lock /* if not 0, try again */
st location, #1 /* store 1 to mark it locked */
ret /* return control to caller */
unlock: st location, #0 /* write 0 to location */
ret /* return control to caller */
Why doesn’t the acquire method work?