aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/syscall.c
diff options
context:
space:
mode:
authorMarvin Borner2020-04-29 15:26:21 +0200
committerMarvin Borner2020-04-29 15:26:21 +0200
commit396d7d303d3bf0e796d0c817883ec1dec928352a (patch)
tree69d79c31ca94da7aa3089709be08f1d959023472 /src/kernel/syscall/syscall.c
parent4f3c75d23188bd480739d6d1514543c95cfe3399 (diff)
Some work on the libgui
Diffstat (limited to 'src/kernel/syscall/syscall.c')
-rw-r--r--src/kernel/syscall/syscall.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c
index af59499..dec3d38 100644
--- a/src/kernel/syscall/syscall.c
+++ b/src/kernel/syscall/syscall.c
@@ -4,6 +4,7 @@
#include <kernel/system.h>
#include <kernel/lib/stdio.h>
#include <kernel/io/io.h>
+#include <kernel/tasks/process.h>
typedef uint32_t (*syscall_func)(uint32_t, ...);
@@ -18,7 +19,6 @@ uint32_t (*syscalls[])() = { [0] = (uint32_t(*)())halt_loop, // DEBUG!
void syscall_handler(struct regs *r)
{
cli();
- log("Received syscall!");
if (r->eax >= sizeof(syscalls) / sizeof(*syscalls))
return;
@@ -27,10 +27,11 @@ void syscall_handler(struct regs *r)
if (!location)
return;
- log("[SYSCALL] %d (0x%x) 0x%x 0x%x 0x%x 0x%x 0x%x", r->eax, location, r->ebx, r->ecx,
- r->edx, r->esi, r->edi);
+ log("[SYSCALL] %s called %d with 0x%x 0x%x 0x%x 0x%x 0x%x", current_proc->name, r->eax,
+ location, r->ebx, r->ecx, r->edx, r->esi, r->edi);
r->eax = location(r->ebx, r->ecx, r->edx, r->esi, r->edi);
+
sti();
}