From ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 7 Jan 2022 17:33:55 +0200 Subject: Steps towards better status/debugging control --- common/tcb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common/tcb.c') diff --git a/common/tcb.c b/common/tcb.c index 7f3cf81..8fea188 100644 --- a/common/tcb.c +++ b/common/tcb.c @@ -9,11 +9,11 @@ static struct tcb *__tcb_cache[MAX_CPUS] = {0}; #define tcb_container(x) \ container_of(x, struct tcb, sp_n) -void threads_insert(struct tcb *t) +stat_t threads_insert(struct tcb *t) { if(!sp_root(t_root)){ sp_root(t_root) = &t->sp_n; - return; + return OK; } struct sp_node *n = sp_root(t_root), *p = NULL; @@ -35,6 +35,7 @@ void threads_insert(struct tcb *t) } sp_insert(&sp_root(t_root), p, &t->sp_n, d); + return OK; } struct tcb *threads_find(id_t tid) -- cgit v1.3