PatchworkOS  c9fea19
A non-POSIX operating system.
Loading...
Searching...
No Matches
syscall.c File Reference
#include <kernel/cpu/interrupt.h>
#include <kernel/cpu/syscall.h>
#include <kernel/cpu/cpu.h>
#include <kernel/cpu/gdt.h>
#include <kernel/log/log.h>
#include <kernel/mem/vmm.h>
#include <kernel/sched/sched.h>
#include <kernel/sched/thread.h>
#include <kernel/defs.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
Include dependency graph for syscall.c:

Go to the source code of this file.

Functions

void syscall_ctx_init (syscall_ctx_t *ctx, const stack_pointer_t *syscallStack)
 Initialize a syscall context.
 
void syscall_ctx_load (syscall_ctx_t *ctx)
 Load the syscall context into the MSR_KERNEL_GS_BASE MSR.
 
static int syscall_descriptor_cmp (const void *a, const void *b)
 
void syscall_table_init (void)
 Sort the syscall table and verify that all syscalls are present.
 
void syscalls_cpu_init (void)
 Initialize syscalls on the current CPU.
 
const syscall_descriptor_tsyscall_get_descriptor (uint64_t number)
 
void syscall_handler (interrupt_frame_t *frame)
 Main C syscall handler.
 

Function Documentation

◆ syscall_descriptor_cmp()

static int syscall_descriptor_cmp ( const void *  a,
const void *  b 
)
static

Definition at line 30 of file syscall.c.

Here is the caller graph for this function:

◆ syscall_get_descriptor()

const syscall_descriptor_t * syscall_get_descriptor ( uint64_t  number)

Definition at line 64 of file syscall.c.

Here is the caller graph for this function: