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

aarch64: init, the first process: its thread, and where its program starts. More...

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

Go to the source code of this file.

Functions

struct aarch64_thread * aarch64_thread_new (void)
 Makes a thread's aarch64 state, with its kernel stack.
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

aarch64: init, the first process: its thread, and where its program starts.

Definition in file proc.c.

Function Documentation

◆ aarch64_thread_new()

struct aarch64_thread * aarch64_thread_new ( void )

Makes a thread's aarch64 state, with its kernel stack.

Returns
the state, or NULL if there was no memory for it

Definition at line 30 of file thread.c.

◆ 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 19 of file proc.c.

References aarch64_thread_new(), thread::arch, arch_proc_init(), proc::entry, queue::head, panic, aarch64_thread::pc, aarch64_thread::sp, proc::threads, USER_STACK, and qnode::value.

Referenced by arch_proc_init(), and kmain().