wip: scheduler needs to change eip or smth in order to call the fn

This commit is contained in:
2025-01-17 12:56:05 +01:00
parent b9691b1948
commit fa3ef311ad
9 changed files with 95 additions and 14 deletions

View File

@ -16,11 +16,11 @@ switch_to_task:
// and + 1 to get the argument (next task)
mov esi, [esp+(4+1)*4]
mov [current_task], esi
mov esp, [current_task]
mov eax, [current_task+4]
mov ebx, [current_task+8]
mov [TSS + 4], eax
mov esp, [current_task] // esp
mov eax, [current_task+4] // esp0
mov ebx, [current_task+8] // cr3
mov [TSS+4], eax // tss.esp0
mov ecx, cr3
// if cr3 hasn't change, do nothing
@ -34,4 +34,4 @@ switch_to_task:
pop ebp
pop ebx
ret
ret // this will also change eip to the next task's instructions