summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
authordzwdz2021-07-23 13:50:00 +0200
committerdzwdz2021-07-23 13:50:00 +0200
commit8a29c78d34f1924c4e39a3a951b36c4512ffe9c1 (patch)
tree624319a6dd15593be381c48d03ef5c8b568020a0 /src/kernel/syscalls.c
parent91c637d847744ba410cbf0e20c62c485e1f6153d (diff)
update the process' EIP/ESP when it syscalls
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 2af8cf9..24706d3 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -18,7 +18,10 @@ int sc_debuglog(const char *msg, size_t len) {
return len;
}
-int syscall_handler(int num, int a, int b, int c) {
+int syscall_handler(int num, int a, int b, int c, void *stack, void *eip) {
+ process_current->esp = stack;
+ process_current->eip = eip;
+
switch (num) {
case SC_DEBUGLOG:
return sc_debuglog((void*)a, b);