diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-16 20:27:46 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-16 20:27:46 +0300 |
| commit | 67c9dc06ca0b5aec6430d50af9444bbe85b6deb5 (patch) | |
| tree | d8f1d9b0b401f61312634b8e2d579249ea4dec34 /common/proc.c | |
| parent | e71dd2d9fe1cc3a6d074f9c1894e2c5200cecdb1 (diff) | |
| download | kmi-67c9dc06ca0b5aec6430d50af9444bbe85b6deb5.tar.gz kmi-67c9dc06ca0b5aec6430d50af9444bbe85b6deb5.zip | |
initial thread id handling
+ At least initial in the sense that this seems like the smartest way to
handle things, that is.
Diffstat (limited to 'common/proc.c')
| -rw-r--r-- | common/proc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/common/proc.c b/common/proc.c index 9f89b7f..e0b8c70 100644 --- a/common/proc.c +++ b/common/proc.c @@ -27,17 +27,13 @@ static vm_t setup_proc_stack(struct tcb *t, size_t bytes) stat_t init_proc(void *fdt, struct vm_branch *b) { + init_tcbs(); + /* todo: cleanup or something */ - struct tcb *t = (struct tcb *)alloc_page(BASE_PAGE, 0); + struct tcb *t = new_thread(); if (!t) return ERR_OOMEM; - - memset(t, 0, sizeof(struct tcb)); t->b_r = b; - t->pid = 0; - t->tid = 0; - - threads_insert(t); init_uvmem(t, UVMEM_START, UVMEM_END); |
