|
AquilaOS documentation
How it works, and its code
|
x86: the child's thread, for fork(). More...
#include <core/system.h>#include <core/string.h>#include <core/arch.h>#include <sys/proc.h>#include <sys/sched.h>#include <aquila/errno.h>Go to the source code of this file.
Functions | |
| int | arch_proc_fork (struct thread *thread, struct proc *fork) |
| Sets up the CPU state of a fork() child's thread: a copy of the parent's kernel stack, registers and FPU state, so that the child returns from fork() as its parent does. | |
x86: the child's thread, for fork().
Definition in file fork.c.
Sets up the CPU state of a fork() child's thread: a copy of the parent's kernel stack, registers and FPU state, so that the child returns from fork() as its parent does.
| thread | the thread that called fork() |
| fork | the child process, whose one thread gets the state |
Definition at line 21 of file fork.c.
References thread::arch, arch_proc_fork(), x86_regs::err, x86_thread::fpu_context, x86_thread::fpu_enabled, queue::head, KERN_STACK_SIZE, kfree(), kmalloc(), x86_thread::kstack, x86_thread::kstack_base, M_ZERO, memcpy(), NULL, x86_thread::regs, x86_thread::rflags, x86_thread::rip, x86_thread::rsp, proc::threads, qnode::value, and x86_fpu_save_to().