AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
execve.c
Go to the documentation of this file.
1
6
7#include <core/system.h>
8#include <core/arch.h>
9#include <sys/proc.h>
10
11/* aarch64: sets the thread's saved program counter and stack pointer,
12 * which it starts from when it next returns to user mode, and drops its
13 * FP/SIMD state: the new program's registers are zeros at their first
14 * use. The C library's start code finds `argc` at the stack pointer. */
16{
17 struct aarch64_thread *arch = thread->arch;
18
20
21 arch->pc = entry;
22 arch->sp = sp;
23}
void arch_exec_start(struct thread *thread, uintptr_t entry, uintptr_t sp)
Sets up a thread to start a new program when it next returns to user mode: at its entry point,...
Definition execve.c:15
void aarch64_fpsimd_drop(struct thread *thread)
Throws away a thread's FP/SIMD state, when it goes or execs a new program, and the registers' values ...
Definition fpsimd.c:106
__SIZE_TYPE__ uintptr_t
Definition stddef.h:12
A thread's aarch64 state (thread->arch).
Definition arch.h:25
uint64_t sp
Definition arch.h:37
uint64_t pc
Definition arch.h:37
A thread.
Definition thread.h:23
void * arch
the architecture's own data: its registers, its kernel stack
Definition thread.h:84