Clear interrupt stack in yield sycall
This commit is contained in:
parent
d54a55aad0
commit
9c5e5e91d0
@ -70,6 +70,10 @@ void gdt_init() {
|
||||
");
|
||||
}
|
||||
|
||||
void tss_stack_reset() {
|
||||
tss.esp0=int_stack_top+0xC0000000;
|
||||
}
|
||||
|
||||
void set_entry(int i,uint32_t base,uint32_t limit,uint8_t access) {
|
||||
gdt[i].limit_low16=limit&0xFFFF;
|
||||
gdt[i].base_low16=base&0xFFFFF;
|
||||
|
@ -2,5 +2,6 @@
|
||||
#define GDT_H
|
||||
|
||||
void gdt_init();
|
||||
void tss_stack_reset();
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "isr.h"
|
||||
#include "idt.h"
|
||||
#include "gdt.h"
|
||||
#include "ports.h"
|
||||
#include "../halt.h"
|
||||
#include "../drivers/vga.h"
|
||||
@ -166,6 +167,7 @@ void isr_handler(registers_t r) {
|
||||
break;
|
||||
case 80:
|
||||
if (r.eax==1) {
|
||||
tss_stack_reset();
|
||||
tasking_yield();
|
||||
} else if (r.eax==2) {
|
||||
tasking_createTask((void*)r.ebx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user