diff options
| author | Ada Christine <adachristine18@gmail.com> | 2022-02-24 01:58:07 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2022-02-24 01:58:07 +0000 |
| commit | 1923e47fd296399180eaf19b990d5e951d71ccd2 (patch) | |
| tree | 2c61fa3d29321c3cf8e31a6ca1b1edcc053cb8f1 /kc/core/task.c | |
| parent | 4fa48a2a7814c2f7d3992533313df283c3aa2652 (diff) | |
many changes
- boot time memory allocation has changed. the fractal page map has been
replaced by a single self-mapped page giving 2MiB of ready virtual
space to play with without needing a fully-initialized memory manager. this
scheme may be repeated for other purposes
- the page stack has now been totally overhauled to make use of sparse
allocation and all of the ugly init_*() procedures are gone. long live
the new interface. also reference counting is a thing now. sort of.
- found a bug in vmt_init_node where insertion did not use the root node as
the parent in the case of no predecessor node. whoops.
Diffstat (limited to 'kc/core/task.c')
| -rw-r--r-- | kc/core/task.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kc/core/task.c b/kc/core/task.c index f9a8fc8..e43dbe0 100644 --- a/kc/core/task.c +++ b/kc/core/task.c @@ -73,7 +73,7 @@ noreturn void task_init(void) // XXX: unfuck this mess at some point // XXX: make this also not demand-allocated or it's gonna fail - char *kernel_rsp0 = vm_alloc(4096); + char *kernel_rsp0 = vm_alloc(4096, VM_ALLOC_ANY); kernel_rsp0[1] = 0; *get_tss_rsp0() = (uintptr_t)kernel_rsp0 + 4096; @@ -169,7 +169,7 @@ void update_time(void) static struct kc_thread *create_thread(void (*thread_f)(void)) { - char *task_bottom = vm_alloc(16384); + char *task_bottom = vm_alloc(16384, VM_ALLOC_ANY); struct kc_thread *thread = (struct kc_thread *)(task_bottom + 16384 - sizeof(*thread)); |
