wip: scheduler needs to change eip or smth in order to call the fn
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user