From a3e45d5dcaf1bf3a9e684b5fcc301413ec994a9b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 9 Nov 2022 16:27:23 +0200 Subject: add basic IPI structure --- include/arch/proc.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/arch/proc.h') diff --git a/include/arch/proc.h b/include/arch/proc.h index 5047eab..d01674d 100644 --- a/include/arch/proc.h +++ b/include/arch/proc.h @@ -48,6 +48,27 @@ struct sys_ret get_args(struct tcb *t); */ void set_thread(struct tcb *t); +/** + * Copy registers from tcb save area to address \p p. + * Intended to be used for copying thread state to rpc stack. + * + * @param t Thread whose registers to save. + * @param p Address to save to. + */ +void save_regs(struct tcb *t, void *p); + +/** + * Copy registers from address \p p to tcb save registers. + * Intended to be used for copying thread state from rpc stack. + * + * @param p Address to load from. + * @param t Thread whose registers to load. + */ +void load_regs(void *p, struct tcb *t); + +void adjust_ipi(struct tcb *t); +void adjust_syscall(struct tcb *t); + /** * Run \c init program. * -- cgit v1.3