From 5793a61eb824a7b97e9bab5913b595a778205cef Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 22 May 2022 15:05:39 +0300 Subject: improved tcb handling in preparation for processes --- common/proc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'common/proc.c') diff --git a/common/proc.c b/common/proc.c index 8793d00..8824c5a 100644 --- a/common/proc.c +++ b/common/proc.c @@ -29,12 +29,13 @@ stat_t init_proc(void *fdt, struct vm_branch *b) { init_tcbs(); - /* todo: cleanup or something */ - struct tcb *t = new_thread(); + /* TODO: cleanup or something */ + struct tcb *t = create_thread(NULL); if (!t) return ERR_OOMEM; - t->b_r = b; + /* use existing branch */ + t->b_r = b; init_uvmem(t, UVMEM_START, UVMEM_END); /* TODO: this stuff should be placed in __sys_exec */ -- cgit v1.3