atomic: add atomic_xadd

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-04 22:19:40 +02:00
commit bdd3915f83
2 changed files with 6 additions and 1 deletions

View file

@ -11,3 +11,8 @@ atomic_cmpxchg:
mov eax, 1
ret
.global atomic_xadd
atomic_xadd:
mov rax, rsi
lock xadd [rdi], rax
ret