Skip to content

Commit 8ffbb9d

Browse files
committed
Fix syscalls (TODO: use sysenter)
1 parent e65c98e commit 8ffbb9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/src/kernel/calls/syscall.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333

3434
#include <ghost/syscall.h>
3535

36-
g_syscall_registration* syscallRegistrations = 0;
36+
g_syscall_registration* syscallRegistrations = nullptr;
3737

3838
void syscallHandle(g_task* task)
3939
{
4040
uint64_t callId = task->state->rax;
41-
void* syscallData = (void*) task->state->rbx;
41+
void* syscallData = (void*) task->state->rdi;
4242

4343
syscall(callId, syscallData);
4444
}
@@ -54,7 +54,7 @@ void syscall(uint32_t callId, void* syscallData)
5454
}
5555

5656
g_syscall_registration* reg = &syscallRegistrations[callId];
57-
if(reg->handler == 0)
57+
if(reg->handler == nullptr)
5858
{
5959
logInfo("%! task %i tried to use unknown syscall %i", "syscall", task->id, callId);
6060
return;

0 commit comments

Comments
 (0)