summaryrefslogtreecommitdiff
path: root/kernel/cpu
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-03-26 11:40:39 +0100
committerAnton Kling <anton@kling.gg>2024-03-26 11:40:39 +0100
commit297231bb3602d868d3891d357026c53f9fcc2402 (patch)
tree6c4f21db84912750f6f464b26bf1e4503d1fe479 /kernel/cpu
parent3deb2df8e62a5f0a5535ee734a5aa13b0959f53f (diff)
Increase support for signals
Diffstat (limited to 'kernel/cpu')
-rw-r--r--kernel/cpu/syscall.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c
index 7734f4e..d47f858 100644
--- a/kernel/cpu/syscall.c
+++ b/kernel/cpu/syscall.c
@@ -87,9 +87,17 @@ void syscall_wait(int *status) {
return;
}
do {
+ current_task->is_halted = 1;
current_task->halts[WAIT_CHILD_HALT] = 1;
switch_task();
+ if (current_task->is_interrupted) {
+ break;
+ }
} while (current_task->halts[WAIT_CHILD_HALT]);
+ if (current_task->is_interrupted) {
+ current_task->is_interrupted = 0;
+ return;
+ }
if (status) {
*status = current_task->child_rc;
}