diff options
author | Marvin Borner | 2021-04-10 15:25:27 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-10 15:25:27 +0200 |
commit | f96b8ad1ee83dec08ae636e179cc48019ca50b12 (patch) | |
tree | 80ff605e1305673291ce6230941db7ed4229856d /kernel/features/proc.c | |
parent | 9655593d80e23d2ea3c091e3187e8e47b278bc3d (diff) |
Some changes here and there
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"); |