From fdbc5adf83741d7e3af0c3f0ffdb59bdf42493b6 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 4 Jul 2024 22:52:47 +0300 Subject: generalize orphants + Allow threads to make themselves become orphants --- include/arch/tcb.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/arch') diff --git a/include/arch/tcb.h b/include/arch/tcb.h index 115f49d..22d3b59 100644 --- a/include/arch/tcb.h +++ b/include/arch/tcb.h @@ -40,12 +40,16 @@ void setup_rpc_stack(struct tcb *t); void destroy_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(); +/** + * @param addr Address of current top of stack, generally from `ctx->rpc_stack`. + * @return \ref true if next rpc return would be into the root process. + */ +bool rpc_stack_empty(pm_t addr); + /** * Current highest address in RPC stack. Allowed to be inaccurate to one base page. * -- cgit v1.3