diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/apos/vmem.h | 10 | ||||
| -rw-r--r-- | include/arch/proc.h | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/apos/vmem.h b/include/apos/vmem.h index 862af44..1e481fa 100644 --- a/include/apos/vmem.h +++ b/include/apos/vmem.h @@ -114,6 +114,16 @@ stat_t init_uvmem(struct tcb *r, vm_t base, vm_t top); */ stat_t destroy_uvmem(struct tcb *r); +/** + * Clone process memory. + * + * @param d Destination tcb. + * @param s Source tcb. + * @return OK. + * + * @todo Come up with better name. clone_uvmem() is taken, but should it be + * renamed to clone_mapping() or something? + */ stat_t clone_mem_regions(struct tcb *d, struct tcb *s); /** 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. |
