Finished basic task switching mechansim
PCB is local to a process's address space. Context switches are written in assembly. Moved x86 headers to include/x86
This commit is contained in:
17
src/x86/preempt.S
Normal file
17
src/x86/preempt.S
Normal file
@@ -0,0 +1,17 @@
|
||||
.section .text
|
||||
|
||||
.global isr_preempt
|
||||
.type isr_preempt, @function
|
||||
isr_preempt:
|
||||
cli
|
||||
push %esp
|
||||
push $0x800
|
||||
call save_context
|
||||
sub $8, %esp
|
||||
push $0x800
|
||||
push $kernel_state
|
||||
call next_process
|
||||
sub $8, %esp
|
||||
push %eax
|
||||
call load_context
|
||||
|
||||
Reference in New Issue
Block a user