From 426da8be0db33405b0cfe53108b65040623972f0 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 11 Jun 2022 19:08:18 +0300 Subject: continue documentation --- common/tcb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'common/tcb.c') diff --git a/common/tcb.c b/common/tcb.c index 3f644c1..a31ac87 100644 --- a/common/tcb.c +++ b/common/tcb.c @@ -129,9 +129,9 @@ struct tcb *create_thread(struct tcb *p) return t; } -static stat_t __clone_proc(struct tcb *p, struct tcb *n) +static stat_t __copy_proc(struct tcb *p, struct tcb *n) { - /** \todo clone memory regions, and mark them MR_COW, as well as copy + /** \todo Copy memory regions, and mark them MR_COW, as well as copy * bm_branch tree but with VM_W off, also at some point write COW * handler */ return OK; @@ -147,7 +147,7 @@ struct tcb *create_proc(struct tcb *p) return 0; if (likely(p)) - __clone_proc(p, n); /* we have a parent thread */ + __copy_proc(p, n); /* we have a parent thread */ return n; } @@ -239,6 +239,7 @@ struct tcb *cur_proc() void use_tcb(struct tcb *t) { + t->cpu_id = cpu_id(); cpu_tcb[cpu_id()] = t; } -- cgit v1.3