29.3.1.1. x86 CMPXCHG instruction
CMPXCHG: compare and exchange. cmpxchg a, b does:
if (RAX == b) {
ZF = 1
b = a
} else {
ZF = 0
RAX = b
}
TODO application: https://stackoverflow.com/questions/6935442/x86-spinlock-using-cmpxchg
CMPXCHG: compare and exchange. cmpxchg a, b does:
if (RAX == b) {
ZF = 1
b = a
} else {
ZF = 0
RAX = b
}
TODO application: https://stackoverflow.com/questions/6935442/x86-spinlock-using-cmpxchg