atomic: clean up atomic_cmpxchg
This commit is contained in:
parent
ea783948f6
commit
f482174458
1 changed files with 5 additions and 6 deletions
|
|
@ -9,10 +9,9 @@ atomic_cmpxchg:
|
||||||
lock cmpxchg %edx, (%rdi)
|
lock cmpxchg %edx, (%rdi)
|
||||||
|
|
||||||
/* if ZF is set, the exchange was successful */
|
/* if ZF is set, the exchange was successful */
|
||||||
pushfq
|
jnz nz
|
||||||
popq %rax
|
movq $0, %rax
|
||||||
andl $0x40, %eax
|
ret
|
||||||
shrl $6, %eax
|
nz:
|
||||||
xorl $1, %eax
|
movq $1, %rax
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue