From 9966b49db468de0168c7a455dfb5b4c66c413c4d Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 19 Dec 2021 17:10:36 +0200 Subject: Massive changes to jump to userspace --- include/apos/tcb.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/apos/tcb.h (limited to 'include/apos/tcb.h') 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 +#include +#include +#include + +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 */ -- cgit v1.3