feat: add threading to Scheduler, fix desktop background selection freeze issue

This commit is contained in:
2026-05-23 16:08:25 +02:00
parent a44a65d432
commit cd159235ca
15 changed files with 895 additions and 117 deletions
+7
View File
@@ -74,6 +74,7 @@ SyscallEntry:
; JumpToUserMode -- initial transition to ring 3 via IRETQ
; RDI = user RIP (entry point)
; RSI = user RSP (top of user stack)
; RDX = user RDI (first SystemV arg, e.g. thread arg; 0 for new processes)
; ====================================================================
global JumpToUserMode
JumpToUserMode:
@@ -86,5 +87,11 @@ JumpToUserMode:
push 0x202 ; RFLAGS (IF=1)
push 0x23 ; CS = UserCode | RPL3
push rdi ; RIP = entry point
mov rdi, rdx ; SystemV arg #1 -> user RDI
xor rsi, rsi ; zero argv-ish registers for hygiene
xor rdx, rdx
xor rcx, rcx
xor r8, r8
xor r9, r9
swapgs ; switch from kernel GS to user GS
iretq