From 162d024a53e1e31e00ff0b6f47dd4590edebc551 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 9 Aug 2020 16:51:01 +0200 Subject: Heavy restructuring of libc, kernel and apps --- src/features/syscall.c | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/features/syscall.c (limited to 'src/features/syscall.c') diff --git a/src/features/syscall.c b/src/features/syscall.c deleted file mode 100644 index 3d012cf..0000000 --- a/src/features/syscall.c +++ /dev/null @@ -1,25 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#include <cpu.h> -#include <interrupts.h> -#include <load.h> -#include <print.h> -#include <proc.h> -#include <str.h> - -int i = 0; -void syscall_handler(struct regs *r) -{ - printf("[SYSCALL] %d\n", r->eax); - - struct proc *a = proc_make(); - bin_load(++i ? "/a" : "/b", a); - strcpy(a->name, "a"); - proc_print(); -} - -void syscall_init() -{ - idt_set_gate(0x80, (u32)isr128, 0x08, 0x8E); - isr_install_handler(0x80, syscall_handler); -} -- cgit v1.2.3