From 363d0ec55f1d7e0d44f14cb1d63fdca4bc72efde Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 9 Oct 2023 16:13:47 +0300 Subject: experimenting with removing lists threads per proc + Gives a very slight improvement to RPC speeds, but mostly cleans up code a little bit. --- include/arch/tcb.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include/arch') 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 */ -- cgit v1.3