From de035473227ba8c61f07fa91d1bc14908e0a03d4 Mon Sep 17 00:00:00 2001 From: jewelcodes Date: Wed, 20 Nov 2024 15:20:31 -0500 Subject: [PATCH] syscalls: ensure thread still exists when handling syscalls --- src/syscalls/queue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/syscalls/queue.c b/src/syscalls/queue.c index c3a9239..33b06e3 100644 --- a/src/syscalls/queue.c +++ b/src/syscalls/queue.c @@ -106,6 +106,7 @@ int syscallProcess() { if(!requests) return 0; SyscallRequest *syscall = syscallDequeue(); if(!syscall) return 0; + if(syscall->thread->status != THREAD_BLOCKED) return 0; setLocalSched(false);