aboutsummaryrefslogtreecommitdiff
path: root/include/apos/tcb.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-12-19 17:10:36 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2021-12-19 17:10:36 +0200
commit9966b49db468de0168c7a455dfb5b4c66c413c4d (patch)
treedf31febe5e1ae52bae68ebe1df8b4469b97e0546 /include/apos/tcb.h
parent8bb1e280280c2f30740defca68ea643c56a3d880 (diff)
downloadkmi-9966b49db468de0168c7a455dfb5b4c66c413c4d.tar.gz
kmi-9966b49db468de0168c7a455dfb5b4c66c413c4d.zip
Massive changes to jump to userspace
Diffstat (limited to 'include/apos/tcb.h')
-rw-r--r--include/apos/tcb.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/apos/tcb.h b/include/apos/tcb.h
new file mode 100644
index 0000000..9cef386
--- /dev/null
+++ b/include/apos/tcb.h
@@ -0,0 +1,34 @@
+#ifndef APOS_TCB_H
+#define APOS_TCB_H
+
+struct tcb;
+struct sp_reg_root;
+
+#include <vmem.h>
+#include <apos/vmem.h>
+#include <apos/types.h>
+#include <apos/sp_tree.h>
+
+typedef size_t id_t;
+
+struct sp_reg_root {
+ struct sp_root free_regions;
+ struct sp_root used_regions;
+};
+
+struct tcb {
+ struct sp_node sp_n;
+
+ id_t pid;
+ id_t tid;
+
+ vm_t stack;
+ vm_t bin;
+
+ struct vm_branch_t *b_r;
+ struct sp_reg_root sp_r;
+};
+
+void threads_insert(struct tcb *t);
+
+#endif /* APOS_TCB_H */