Fix user apps randomly crashing (APIC, GDT layout, syscall entry)
All checks were successful
Build documentation / build-and-deploy (push) Successful in 23s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 23s
This commit is contained in:
@@ -12,19 +12,19 @@
|
||||
#include <syscall/syscall.h>
|
||||
|
||||
#define DEFINE_SYSCALL(name) \
|
||||
int name (struct proc* proc, uintptr_t UNUSED a1, uintptr_t UNUSED a2, uintptr_t UNUSED a3, \
|
||||
uintptr_t UNUSED a4, uintptr_t UNUSED a5, uintptr_t UNUSED a6)
|
||||
int name (struct proc* proc, void* UNUSED regs, uintptr_t UNUSED a1, uintptr_t UNUSED a2, \
|
||||
uintptr_t UNUSED a3, uintptr_t UNUSED a4, uintptr_t UNUSED a5, uintptr_t UNUSED a6)
|
||||
|
||||
/* int proc_quit (void) */
|
||||
DEFINE_SYSCALL (sys_proc_quit) {
|
||||
proc_kill (proc);
|
||||
proc_sched ();
|
||||
proc_kill (proc, regs);
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
/* int proc_test (void) */
|
||||
DEFINE_SYSCALL (sys_proc_test) {
|
||||
DEBUG ("test syscall message!\n");
|
||||
char c = (char)a1;
|
||||
DEBUG ("test syscall! %c\n", c);
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <libk/std.h>
|
||||
#include <proc/proc.h>
|
||||
|
||||
typedef int (*syscall_handler_func_t) (struct proc* proc, uintptr_t a1, uintptr_t a2, uintptr_t a3,
|
||||
uintptr_t a4, uintptr_t a5, uintptr_t a6);
|
||||
typedef int (*syscall_handler_func_t) (struct proc* proc, void* regs, uintptr_t a1, uintptr_t a2,
|
||||
uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6);
|
||||
|
||||
syscall_handler_func_t syscall_find_handler (int syscall_num);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user