diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 17:33:55 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 17:33:55 +0200 |
| commit | ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7 (patch) | |
| tree | 1273c7815d6790e746f6e7ecfcd464e5cab39f2e /common/tcb.c | |
| parent | be78fcb0acc665d4db8edb9cda53f6863d27dd85 (diff) | |
| download | kmi-ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7.tar.gz kmi-ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7.zip | |
Steps towards better status/debugging control
Diffstat (limited to 'common/tcb.c')
| -rw-r--r-- | common/tcb.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) |
