aboutsummaryrefslogtreecommitdiff
path: root/common/tcb.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-04-18 21:10:57 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-04-21 12:12:38 +0300
commit7967a9ab13214543041e4408086668b4db8d3e62 (patch)
tree4dab7b89bd9d5b5b8280877f9d8eb23a1edf1230 /common/tcb.c
parent1ceed7525272b82c1028ebd353e65c3a63bd2714 (diff)
downloadkmi-7967a9ab13214543041e4408086668b4db8d3e62.tar.gz
kmi-7967a9ab13214543041e4408086668b4db8d3e62.zip
start working on timer subsys
Diffstat (limited to 'common/tcb.c')
-rw-r--r--common/tcb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/tcb.c b/common/tcb.c
index 43c5969..4a69df6 100644
--- a/common/tcb.c
+++ b/common/tcb.c
@@ -24,7 +24,7 @@ void init_tcbs()
/* MM_O1 is 2MiB on riscv64, so 262144 different possible thread ids.
* Should be enough, if we're really strapped for memory I might try
* something smaller but this is fine for now. */
- tcbs = alloc_page(MM_O1, 0);
+ tcbs = (struct tcb **)alloc_page(MM_O1, 0);
num_tids = __o_size(MM_O1) / sizeof(struct tcb *);
memset(tcbs, 0, __o_size(MM_O1));
}
@@ -57,6 +57,7 @@ struct tcb *new_thread()
struct tcb *t = (struct tcb *)get_node(&root);
t->tid = __alloc_tid(t);
+ return t;
}
void destroy_thread(struct tcb *t)