diff options
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r-- | kernel/features/proc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c index d5bf2e6..3a6b429 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -54,7 +54,7 @@ HOT FLATTEN void scheduler(struct regs *regs) current = idle_proc; } - tss_set_stack(0x10, PROC(current)->kernel_stack); + tss_set_stack(GDT_SUPER_DATA_OFFSET, PROC(current)->stack.kernel); memory_switch_dir(PROC(current)->page_dir); memcpy(regs, &PROC(current)->regs, sizeof(*regs)); @@ -223,6 +223,7 @@ end: proc_state(p, PROC_BLOCKED); } +// TODO: Rewrite block/unblock mechanisms void proc_unblock(u32 id, enum proc_block_type type) { struct page_dir *dir_bak; @@ -582,7 +583,7 @@ NORETURN void proc_init(void) // We'll shortly jump to usermode. Clear and protect every secret! memory_user_hook(); - tss_set_stack(0x10, init->kernel_stack); + tss_set_stack(GDT_SUPER_DATA_OFFSET, init->stack.kernel); memory_switch_dir(init->page_dir); printf("Jumping to userspace!\n"); |