v2 initial commit
This commit is contained in:
parent
2c97dba9f7
commit
d2ef885e8d
118 changed files with 2420 additions and 9320 deletions
13
amd64/kernel/atomic.S
Normal file
13
amd64/kernel/atomic.S
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.intel_syntax noprefix
|
||||
.global atomic_cmpxchg
|
||||
atomic_cmpxchg:
|
||||
mov eax, esi
|
||||
lock cmpxchg [rdi], edx
|
||||
|
||||
jnz nz
|
||||
xor eax, eax
|
||||
ret
|
||||
nz:
|
||||
mov eax, 1
|
||||
ret
|
||||
|
||||
Loading…
Reference in a new issue