From bb57b124d1bb385d41747f50be7dd4f3625539c1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 24 Nov 2019 23:34:32 +0100 Subject: Major coding style reformatting -> Kernighan & Ritchie This project now (hopefully) uses the same style recommended by Kernighan and Ritchie and used in the Linux Kernel --- src/kernel/syscall/syscall.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/kernel/syscall/syscall.c') diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index dec3e8e..1a8de52 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -17,7 +17,8 @@ static void *syscalls[3] = { }; uint32_t num_syscalls = 3; -void syscall_handler(struct regs *r) { +void syscall_handler(struct regs *r) +{ serial_write("SYSCALL"); if (r->eax >= num_syscalls) return; @@ -25,7 +26,7 @@ void syscall_handler(struct regs *r) { void *location = syscalls[r->eax]; int ret; - asm volatile (" \ + asm (" \ push %1; \ push %2; \ push %3; \ @@ -41,6 +42,7 @@ void syscall_handler(struct regs *r) { r->eax = ret; } -void syscalls_install() { +void syscalls_install() +{ irq_install_handler(0x80, syscall_handler); } -- cgit v1.2.3