diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-11 19:46:22 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-11-11 19:46:22 +0200 |
| commit | 1d37792fb7a47135f0e7b7fc245e83bb1d8fc496 (patch) | |
| tree | 09ec92012bb9d74d5d26bc7a4a7647c36c9acb3e /include/arch | |
| parent | 9edd65c48ee75751327c6ee6d42a7009e726d667 (diff) | |
| download | kmi-1d37792fb7a47135f0e7b7fc245e83bb1d8fc496.tar.gz kmi-1d37792fb7a47135f0e7b7fc245e83bb1d8fc496.zip | |
less buggy fork
+ Not strictly done yet, but we can swap between two processes :D
Diffstat (limited to 'include/arch')
| -rw-r--r-- | include/arch/proc.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ -67,6 +67,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. * * @param t Thread to do modifications to. |
