diff --git a/src/include/kernel/syscalls.h b/src/include/kernel/syscalls.h index eb9df2d..7751c7a 100644 --- a/src/include/kernel/syscalls.h +++ b/src/include/kernel/syscalls.h @@ -15,6 +15,7 @@ /* IPC syscall indexes, this range will be used for immediate handling without * waiting for the kernel thread to dispatch the syscall */ +#define SYSCALL_ACCEPT 44 // accept() #define SYSCALL_IPC_START 42 // bind() #define SYSCALL_IPC_END 46 // send() diff --git a/src/syscalls/queue.c b/src/syscalls/queue.c index be13683..c3a9239 100644 --- a/src/syscalls/queue.c +++ b/src/syscalls/queue.c @@ -28,7 +28,8 @@ void syscallHandle(void *ctx) { // allow immediate handling of IPC syscalls without going through the // syscall queue for performance if((req->function >= SYSCALL_IPC_START && req->function <= SYSCALL_IPC_END) || - (req->function >= SYSCALL_RW_START && req->function <= SYSCALL_RW_END)) { + (req->function >= SYSCALL_RW_START && req->function <= SYSCALL_RW_END) || + (req->function == SYSCALL_ACCEPT)) { setLocalSched(false); syscallDispatchTable[req->function](req);