From 7967a9ab13214543041e4408086668b4db8d3e62 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 18 Apr 2022 21:10:57 +0300 Subject: start working on timer subsys --- common/tcb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/tcb.c') 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) -- cgit v1.3