aboutsummaryrefslogtreecommitdiff
path: root/include/arch/tcb.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-10-09 16:13:47 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-10-09 16:15:06 +0300
commit363d0ec55f1d7e0d44f14cb1d63fdca4bc72efde (patch)
tree122617be8859396dfd067e0da2cca4d8f670c277 /include/arch/tcb.h
parent9c9d589ea310f1290e4d6d2019fc8b51d9a86e42 (diff)
downloadkmi-363d0ec55f1d7e0d44f14cb1d63fdca4bc72efde.tar.gz
kmi-363d0ec55f1d7e0d44f14cb1d63fdca4bc72efde.zip
experimenting with removing lists threads per proc
+ Gives a very slight improvement to RPC speeds, but mostly cleans up code a little bit.
Diffstat (limited to 'include/arch/tcb.h')
-rw-r--r--include/arch/tcb.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/arch/tcb.h b/include/arch/tcb.h
index af12e0b..4e82ab1 100644
--- a/include/arch/tcb.h
+++ b/include/arch/tcb.h
@@ -25,11 +25,43 @@
*/
void tcb_assign(struct tcb *t);
+/**
+ * Set up RPC stack in a way that is convenient for the underlying architecture.
+ *
+ * @param t Thread whose RPC stack should be set up.
+ */
void setup_rpc_stack(struct tcb *t);
+
+/**
+ * Maximum size of one individual RPC stack instance.
+ *
+ * @return Max size of one individual RPC stack instance.
+ */
size_t max_rpc_size();
+/**
+ * Current highest address in RPC stack. Allowed to be inaccurate to one base page.
+ *
+ * @param t Thread whose position in the RPC stack is to be determined.
+ * @return Virtual address corresponding to the current RPC stack position.
+ */
vm_t rpc_position(struct tcb *t);
+
+/**
+ * Mark RPC stack up to \p top accessible from userspace.
+ *
+ * @param t Thread whose RPC stack is being modified.
+ * @param top Address up to where stack should be accessible from userspace.
+ */
void mark_rpc_valid(struct tcb *t, vm_t top);
+
+/**
+ * Mark RPC stack down to \p bottom inaccessible from userspace.
+ *
+ * @param t Thread whose RPC stack is being modified.
+ * @param bottom Address down to where stack should be inaccessible from
+ * userspace.
+ */
void mark_rpc_invalid(struct tcb *t, vm_t bottom);
#endif /* KMI_ARCH_TCB_H */