From 5976ad390a15726c3ddfacf8c8b282c8350f9554 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 29 Oct 2024 21:17:31 +0200 Subject: start moving towards threads always being in rpc --- include/arch/vmem.h | 2 +- include/kmi/bkl.h | 2 ++ include/kmi/tcb.h | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/arch/vmem.h b/include/arch/vmem.h index 1674e95..79c42b9 100644 --- a/include/arch/vmem.h +++ b/include/arch/vmem.h @@ -179,7 +179,7 @@ void destroy_vmem(struct vmem *b); * @param r Source virtual memory of clone. * @param b Destination virtual memory of clone. */ -void clone_uvmem(struct vmem * restrict r, struct vmem * restrict b); +void clone_uvmem(struct vmem *r, struct vmem *b); /** * Jump into kernelspace from a physical address space. diff --git a/include/kmi/bkl.h b/include/kmi/bkl.h index 39e3ef9..8a56061 100644 --- a/include/kmi/bkl.h +++ b/include/kmi/bkl.h @@ -12,6 +12,8 @@ #include +void bkl_init(); + /** Lock the Big Kernel Lock. */ void bkl_lock(); diff --git a/include/kmi/tcb.h b/include/kmi/tcb.h index d61845f..b12ad7e 100644 --- a/include/kmi/tcb.h +++ b/include/kmi/tcb.h @@ -22,6 +22,27 @@ struct tcb; #include +/** Structure for maintaining the required context data for an rpc call. */ +struct call_ctx { + /** Execution continuation point. */ + vm_t exec; + + /** Position in rpc stack. */ + vm_t rpc_stack; + + /** Effective process ID. */ + id_t eid; + + /** Current process ID. */ + id_t pid; + + /** If this frame was due to a notification, which means leaving the + * frame must restore registers as they were */ + bool notify; + + /* register save area follows this in the stack */ +}; + /** * Check if thread is process thread. * -- cgit v1.3