Skip to content

Commit

Permalink
x86_64: leave interrupts disabled in sensitive areas
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Jan 17, 2025
1 parent 8528ab4 commit 3465192
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/platform/x86_64/lock.asm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ acquireLock:
global acquireLockBlocking
align 16
acquireLockBlocking:
pushfq
cli

test dword [rdi], 1
Expand All @@ -57,7 +56,6 @@ acquireLockBlocking:
lock bts dword [rdi], 0
jc .wait

popfq
mov rax, 1
ret

Expand All @@ -72,15 +70,11 @@ acquireLockBlocking:
global releaseLock
align 16
releaseLock:
pushfq
cli

xor rax, rax
test dword [rdi], 1
jz .done

mov [rdi], eax

.done:
popfq
ret

0 comments on commit 3465192

Please sign in to comment.