tasking: switch tss.esp0 on switching process
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
|
||||
struct tss_entry_struct tss;
|
||||
|
||||
struct seg_desc gdt[NR_GDT_ENTRIES];
|
||||
|
||||
struct desc_r gdtr = {
|
||||
sizeof(gdt) - 1,
|
||||
(uint32_t)&gdt
|
||||
};
|
||||
|
||||
void bss_init()
|
||||
{
|
||||
memset((void *)((int)_edata), 0, KERNEL_BSS_SIZE);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "../include/paging.h"
|
||||
#include "../include/string.h"
|
||||
#include "../include/liballoc.h"
|
||||
#include "../include/gdt.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -145,6 +146,7 @@ void schedule() {
|
||||
}
|
||||
|
||||
if (next && next != current) {
|
||||
tss.esp0 = next->kesp;
|
||||
switchProcess(next);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user