aboutsummaryrefslogtreecommitdiff
path: root/common/tcb.c
diff options
context:
space:
mode:
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)