Kernel: Make RecursiveSpinLock thread safe

also SpinLock is now implemented with gcc builtins
This commit is contained in:
Bananymous
2023-05-29 19:38:09 +03:00
parent 998999a755
commit ff83f967d8
4 changed files with 35 additions and 39 deletions

View File

@@ -1,17 +0,0 @@
.global spinlock_lock_asm
spinlock_lock_asm:
lock; btsq $0, (%rdi)
jnc .done
.retry:
pause
testq $1, (%rdi)
jne .retry
lock; btsq $0, (%rdi)
jc .retry
.done:
ret
.global spinlock_unlock_asm
spinlock_unlock_asm:
movl $0, (%rdi)
ret