aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/arch/tcb.h7
-rw-r--r--include/kmi/tcb.h16
2 files changed, 16 insertions, 7 deletions
diff --git a/include/arch/tcb.h b/include/arch/tcb.h
index 931b800..b8b0961 100644
--- a/include/arch/tcb.h
+++ b/include/arch/tcb.h
@@ -42,6 +42,13 @@ void setup_rpc_stack(struct tcb *t);
void destroy_rpc_stack(struct tcb *t);
/**
+ * Reset RPC stack to top.
+ *
+ * @param t Thread whose RPC stack should be reset.
+ */
+void reset_rpc_stack(struct tcb *t);
+
+/**
* @return Max size of one individual RPC stack instance.
*/
size_t max_rpc_size();
diff --git a/include/kmi/tcb.h b/include/kmi/tcb.h
index b7fd3d6..a06d801 100644
--- a/include/kmi/tcb.h
+++ b/include/kmi/tcb.h
@@ -122,18 +122,13 @@ struct tcb {
vm_t thread_stack;
/** Address of this thread's stack top. */
- vm_t thread_stack_top;
+ vm_t thread_stack_size;
/** Current address of usable rpc stack. */
vm_t rpc_stack;
- /** \todo Check if each thread should be allowed more than just one
- * region of thread local storage. */
- /** Possible thread local storage. */
- vm_t thread_storage;
-
/** Reference count to process. */
- atomic_int_fast32_t refcount;
+ long refcount;
/** Process context of thread. */
struct tcb_ctx proc;
@@ -322,6 +317,13 @@ struct tcb *get_tcb(id_t tid);
stat_t alloc_stack(struct tcb *t);
/**
+ * Free thread stack.
+ *
+ * @param t Thread whose stack to free.
+ */
+void free_stack(struct tcb *t);
+
+/**
* Set address to jump to when returning to userspace.
*
* @param t Thread return address to set.