AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
proc.c File Reference

x86: the first process's thread. More...

#include <core/system.h>
#include <core/string.h>
#include <core/panic.h>
#include <core/arch.h>
#include <sys/proc.h>
#include <sys/sched.h>
#include <sys/signal.h>
#include <ds/queue.h>
#include <mm/pmap.h>

Go to the source code of this file.

Functions

void arch_proc_init (struct proc *proc)
 Sets up the architecture's part of a new process's thread (init's, at boot): its kernel stack, and a start at the program's entry point in user mode.

Detailed Description

x86: the first process's thread.

Definition in file proc.c.

Function Documentation

◆ arch_proc_init()

void arch_proc_init ( struct proc * proc)

Sets up the architecture's part of a new process's thread (init's, at boot): its kernel stack, and a start at the program's entry point in user mode.

Parameters
procthe process

Definition at line 20 of file proc.c.

References thread::arch, arch_proc_init(), proc::entry, queue::head, KERN_STACK_SIZE, kmalloc(), x86_thread::kstack, x86_thread::kstack_base, M_ZERO, panic, x86_thread::rflags, x86_thread::rip, x86_thread::rsp, proc::threads, USER_STACK, qnode::value, and X86_EFLAGS.