aboutsummaryrefslogtreecommitdiff
path: root/common/tcb.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-06-11 19:08:18 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-06-11 19:08:18 +0300
commit426da8be0db33405b0cfe53108b65040623972f0 (patch)
treec1776cf14695d717a92d5d46d7a07c978a0e3618 /common/tcb.c
parentde99380f12f8e2fe4acf7734db0e1e37a356c45f (diff)
downloadkmi-426da8be0db33405b0cfe53108b65040623972f0.tar.gz
kmi-426da8be0db33405b0cfe53108b65040623972f0.zip
continue documentation
Diffstat (limited to 'common/tcb.c')
-rw-r--r--common/tcb.c7
1 files changed, 4 insertions, 3 deletions
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;
}