PatchworkOS
Loading...
Searching...
No Matches
loader.c File Reference
#include <kernel/sched/loader.h>
#include <kernel/cpu/gdt.h>
#include <kernel/fs/vfs.h>
#include <kernel/log/log.h>
#include <kernel/mem/vmm.h>
#include <kernel/sched/sched.h>
#include <kernel/sched/thread.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/elf.h>
#include <sys/math.h>

Go to the source code of this file.

Functions

static void * loader_load_program (thread_t *thread)
 
static char ** loader_setup_argv (thread_t *thread)
 
static void loader_process_entry (void)
 
thread_tloader_spawn (const char **argv, priority_t priority, const path_t *cwd)
 Spawns a child process from an executable file.
 
 SYSCALL_DEFINE (SYS_SPAWN, pid_t, const char **argv, const spawn_fd_t *fds, const char *cwdString, spawn_attr_t *attr)
 
thread_tloader_thread_create (process_t *parent, void *entry, void *arg)
 Creates a new thread within an existing process.
 
 SYSCALL_DEFINE (SYS_THREAD_CREATE, tid_t, void *entry, void *arg)
 

Function Documentation

◆ loader_load_program()

◆ loader_process_entry()

◆ loader_setup_argv()

static char ** loader_setup_argv ( thread_t thread)
static

◆ SYSCALL_DEFINE() [1/2]

◆ SYSCALL_DEFINE() [2/2]

SYSCALL_DEFINE ( SYS_THREAD_CREATE  ,
tid_t  ,
void *  entry,
void *  arg 
)