From 1d37792fb7a47135f0e7b7fc245e83bb1d8fc496 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 11 Nov 2022 19:46:22 +0200 Subject: less buggy fork + Not strictly done yet, but we can swap between two processes :D --- include/arch/proc.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/arch') diff --git a/include/arch/proc.h b/include/arch/proc.h index a64f978..e2b99ea 100644 --- a/include/arch/proc.h +++ b/include/arch/proc.h @@ -66,6 +66,14 @@ void save_regs(struct tcb *t, void *p); */ void load_regs(void *p, struct tcb *t); +/** + * Copy registers from one thread to another. Used by \ref fork(), for example. + * + * @param d Destination. + * @param s Source. + */ +void clone_regs(struct tcb *d, struct tcb *s); + /** * Do modifications to \ref tcb state if necessary for ipis to work. * -- cgit v1.3