Skip to content

Commit

Permalink
syscalls: ensure thread still exists when handling syscalls
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 20, 2024
1 parent 2ad11c9 commit de03547
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/syscalls/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit de03547

Please sign in to comment.