aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/syscall.c
diff options
context:
space:
mode:
authorMarvin Borner2019-11-24 23:34:32 +0100
committerMarvin Borner2019-11-24 23:34:32 +0100
commitbb57b124d1bb385d41747f50be7dd4f3625539c1 (patch)
treefe461afad63df40571784565e8d435cba8c8e59c /src/kernel/syscall/syscall.c
parentf9c50b9ff23e9a3e8db5826fef7a6e7ebb8af21d (diff)
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
Diffstat (limited to 'src/kernel/syscall/syscall.c')
-rw-r--r--src/kernel/syscall/syscall.c8
1 files changed, 5 insertions, 3 deletions
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);
}