The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
trampoline.c File Reference
#include "usermode.h"
#include "arch/arch.h"
#include "arch/arch_context.h"
#include "kernel/process/process.h"
#include "kernel/panic.h"
#include "kernel/scheduler/scheduler.h"
#include "common/stdint.h"

Functions

void setup_child_stack (process_t *child, uintptr_t entry)
 set up a child process's kernel stack so that when arch_context_switch switches to it, it "returns" into process_entry_trampoline.

Function Documentation

◆ setup_child_stack()

void setup_child_stack ( process_t * child,
uintptr_t entry )

set up a child process's kernel stack so that when arch_context_switch switches to it, it "returns" into process_entry_trampoline.

set up a child process's kernel stack so that context_switch returns into the process entry trampoline.

the ELF entry point is stashed in the process so the trampoline can read it later.

set up a child process's kernel stack so that when arch_context_switch switches to it, it "returns" into process_entry_trampoline.

Parameters
childpointer to the child process control block.
entryELF entry point for the child.